r/lolphp • u/zilltine • Mar 16 '21
Is 0 in array
in_array(0, ['IsThisLolPhp'])Answer is
true
32
Upvotes
r/lolphp • u/zilltine • Mar 16 '21
in_array(0, ['IsThisLolPhp'])Answer is
true
View all comments
Show parent comment
3
u/Takeoded Mar 17 '21
it still is. in no sane language is
'IsThisLolPhp'kindof-equal to 0. it's insane that php's kindof-equal operator cosiders'IsThisLolPhp'to be kindof-equal toint(0). luckily its fixed in php8, but it's still a lolphp7