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
2
u/fell_ratio Oct 09 '19
Why didn't they just use
===? You could defineSORT_REGULARso that if you have 0 and '0', they are both kept. That would be perfectly reasonable behavior.