3 ms·
Probably. But then again, we're talking about a language where THIS happens: php> echo "2coolforschool" + 1; 3 php> echo "2.1coolforschool" + 1; 3.1 php> e
by TylerE 14y ago
Probably. But then again, we're talking about a language where THIS happens:
php> echo "2coolforschool" + 1;
3
php> echo "2.1coolforschool" + 1;
3.1
php> echo "coolforschool" + 1;
1
So treating all kinds of garbage as valid numbers is absolutely part of PHP.
- piggity 14y agoThat's just the general design philosophy of the MP components of the LAMP stack. Do the stupidest thing that could possibly work; and it probably will. For now.