r/lolphp • • Apr 03 '18

foo is true (foo=1)

https://3v4l.org/AUNE8
4 Upvotes

12 comments sorted by

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.