3 ms·
Exactly, it's not that bizarre. PHP assumes when you're using && you're going to have a boolean outcome. The odd bit is that casting a boolean to a string[0] w
by RossM 13y ago
Exactly, it's not that bizarre. PHP assumes when you're using && you're going to have a boolean outcome.
The odd bit is that casting a boolean to a string[0] with echo coerces the result to (string) "1" for true and (string) "" for false.
[0]: http://www.php.net/manual/en/language.types.string.php#language.types.string.casting http://www.php.net/manual/en/language.types.string.php#langu...