note 121764 deleted from migration71.other-changes by cmb
| From: | cmb@php.net | Date: | Thu, 22 Nov 2018 17:53:02 +0000 |
| Subject: | note 121764 deleted from migration71.other-changes by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-209755@lists.php.net to get a copy of this message | ||
Note Submitter: tuxedobob
----
I'm sure this is something that some people think is the greatest thing ever, but to me, the
warnings thrown by "bad" string to number conversion are a complete pain in the ass.
Plenty of code relies on the idea that 7 + '' = 7, no warning thrown, because that's
expected.
I don't want to disable all warnings, just this one, but I can't, so now there's
going to be
$total += (is_numeric($val) ? $val : 0);
all over the place.