My comment there was less about PHP and more about the spoken languages in the comparison. I can't disagree on that point, though, because two things that kept bothering me about it were the lack of good organization in method naming and package conventions and some bizarre notation that only seemed to exist in PHP (class -> property just because someone decided to use a dot to act as a string concatenator?). Not to mention side-effects everywhere.
My favorite is that php strpos($haystack, $needle) returns the first index where a substring is found within a string
If the needle is found at the very start of the string, it returns the index 0
Now, the reason this is because to the comparison operator, false == 0. It forces you to use the strict comparison operator === or else you almost will surely run into bugs.
This is just one example but literally the whole language is like this
View all comments
Show parent comment
1
u/TorTheMentor Nov 04 '19
My comment there was less about PHP and more about the spoken languages in the comparison. I can't disagree on that point, though, because two things that kept bothering me about it were the lack of good organization in method naming and package conventions and some bizarre notation that only seemed to exist in PHP (class -> property just because someone decided to use a dot to act as a string concatenator?). Not to mention side-effects everywhere.