note 123903 added to language.types.string
| From: | vseokdog at gmail dot com | Date: | Tue, 04 Jun 2019 22:12:29 +0000 |
| Subject: | note 123903 added to language.types.string | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-211183@lists.php.net to get a copy of this message | ||
Don't forget about new E_WARNING and E_NOTICE errors from PHP 7.1.x: they have been introduced
when invalid strings are coerced using operators expecting numbers (+ - * / ** % << >> |
& ^) or their assignment equivalents. An E_NOTICE is emitted when the string begins with a
numeric value but contains trailing non-numeric characters, and an E_WARNING is emitted when the
string does not contain a numeric value.
Example:
$foo = 1 + "bob-1.3e3";
$foo = "10.2 pigs " + 1.0;
Will produce: Warning: A non-numeric value encountered
Read more: https://www.php.net/manual/en/migration71.other-changes.php
----
Server IP: 208.43.231.9
Probable Submitter: 185.85.3.195 (proxied: 178.122.244.33)
----
Manual Page -- http://php.net/manual/en/language.types.string.php
Edit -- https://master.php.net/note/edit/123903
Del: integrated -- https://master.php.net/note/delete/123903/integrated
Del: useless -- https://master.php.net/note/delete/123903/useless
Del: bad code -- https://master.php.net/note/delete/123903/bad+code
Del: spam -- https://master.php.net/note/delete/123903/spam
Del: non-english -- https://master.php.net/note/delete/123903/non-english
Del: in docs -- https://master.php.net/note/delete/123903/in+docs
Del: other reasons-- https://master.php.net/note/delete/123903
Reject -- https://master.php.net/note/reject/123903
Search -- https://master.php.net/manage/user-notes.php