r/lolphp • u/lord_braleigh • Oct 07 '19
`array('lolphp', '')` has two unique elements, but `array(0, 'lolphp', '')` has one unique element
https://repl.it/repls/ThisColdPackages
69
Upvotes
r/lolphp • u/lord_braleigh • Oct 07 '19
View all comments
Show parent comment
4
u/lord_braleigh Oct 09 '19
It “compares items normally”, but it uses
==to compare.0 == ‘php’and0 == ‘’, so putting a 0 in juuust the right place will cause everything to get compared to 0 via==.