From 5be140004d8079dca6e91801c1857d1119bf4408 Mon Sep 17 00:00:00 2001 From: Andrea Faulds Date: Wed, 30 Mar 2016 13:26:27 +0100 Subject: [PATCH] Expand UPGRADING and NEWS re: numeric strings changes --- NEWS | 6 +++--- UPGRADING | 13 ++++++++++--- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/NEWS b/NEWS index af7a2afe12..dfbc707d7a 100644 --- a/NEWS +++ b/NEWS @@ -17,9 +17,9 @@ PHP NEWS . Added a form of the list() construct where keys can be specified. (Andrea) . Number operators taking numeric strings now emit E_NOTICEs or E_WARNINGs when given malformed numeric strings. (Andrea) - . (int), intval() where $base is 10 or unspecified, settype(), integer - operators and other conversions now always respect scientific notation in - numeric strings. (Andrea) + . (int), intval() where $base is 10 or unspecified, settype(), decbin(), + decoct(), dechex(), integer operators and other conversions now always + respect scientific notation in numeric strings. (Andrea) - FTP: . Implemented FR #55651 (Option to ignore the returned FTP PASV address). diff --git a/UPGRADING b/UPGRADING index bda00da7db..ad3b15f0ee 100644 --- a/UPGRADING +++ b/UPGRADING @@ -21,9 +21,9 @@ PHP 7.1 UPGRADE NOTES - Core: . 'void' can no longer be used as the name of a class, interface, or trait. This applies to declarations, class_alias() and use statements. - . (int), intval() where $base is 10 or unspecified, settype(), integer - operators and other conversions now always respect scientific notation in - numeric strings. + . (int), intval() where $base is 10 or unspecified, settype(), decbin(), + decoct(), dechex(), integer operators and other conversions now always + respect scientific notation in numeric strings. (RFC: https://wiki.php.net/rfc/invalid_strings_in_arithmetic) - JSON: @@ -44,6 +44,13 @@ PHP 7.1 UPGRADE NOTES . Number operators taking numeric strings now emit "A non well formed numeric string encountered" E_NOTICEs for leading-numeric strings, and "A non-numeric string encountered" E_WARNINGs for non-numeric strings. + This always applies to the +, -, *, /, **, %, << and >> operators, and + their assignment counterparts +=, -=, *=, /=, **=, %=, <<= and >>=. + For the bitwise operators |, & and ^, and their assignment counterparts + |=, &= and ^=, this only applies where only one operand is a string. + Note that this never applies to the bitwise NOT operator, ~, which does not + handle numeric strings, nor to the increment and decrement operators + ++ and --, which have a unique approach to handling numeric strings. (RFC: https://wiki.php.net/rfc/invalid_strings_in_arithmetic) ======================================== -- 2.40.0