We're using pseudo-code to /r/lolphp about the language's lovely capacity to make wild-ass guesses about what variables should evaluate to when placed in various type-casting situations.
Any sane language (even JavaScript, for most situations not going from <something> -> boolean) will instead politely tell you to GTFO.
There's no guessing involved, automatic type conversion is well documented and follows a specific set of rules. Also get this, YOU DON'T HAVE TO USE AUTOMATIC TYPE CONVERSION.
The fact that you can use === is a perfectly valid point.
However, I would argue that there are often cases in PHP where the implicit interpretation of types leads to unholy nonsense: a good example being the automagical interpretation of certain patterns of quotes in PCRE (Perl-like regular expression) replacement statements that leads to portions of the string being evaluated as raw PHP code (eBay got compromised by this "feature" a little while back).
4
u/[deleted] Mar 26 '14
PHP Parse error: syntax error, unexpected '==' (
T_IS_EQUAL) in Command line code on line 1