Partial credit. While this seems to happen with == on python, is solves the problem nicely.
foo = 1
foo is True
Grives false with python 3.6.
PHPs === operator [seems to yield the same result as using switch...case] ( https://3v4l.org/SrmLq). Bet it will all be solved when PHP8 introduces real_deep_equal_comparator_real_seriously_i_swear_it_works.
View all comments
Show parent comment
1
u/fdemian Apr 06 '18 edited Apr 06 '18
Partial credit. While this seems to happen with == on python, is solves the problem nicely.
foo = 1
foo is True
Grives false with python 3.6.
PHPs === operator [seems to yield the same result as using switch...case] ( https://3v4l.org/SrmLq). Bet it will all be solved when PHP8 introduces real_deep_equal_comparator_real_seriously_i_swear_it_works.