summaryrefslogtreecommitdiff
path: root/UPGRADING
diff options
context:
space:
mode:
authorAndrea Faulds <ajf@ajf.me>2016-11-14 18:20:45 +0000
committerAndrea Faulds <ajf@ajf.me>2016-11-14 18:20:45 +0000
commita0502b89a65d24eb191a7c85bcffcf9b91454735 (patch)
treee40f7d1cf796b71b4d137939623ef6e32041665b /UPGRADING
parent531eedf38ffe127e80c4286588212211b59d4db6 (diff)
downloadphp-git-a0502b89a65d24eb191a7c85bcffcf9b91454735.tar.gz
Convert numeric keys in object/array casts
RFC: https://wiki.php.net/rfc/convert_numeric_keys_in_object_array_casts This converts key types as appropriate in object to array and array to object casts, as well as in get_object_vars().
Diffstat (limited to 'UPGRADING')
-rw-r--r--UPGRADING10
1 files changed, 10 insertions, 0 deletions
diff --git a/UPGRADING b/UPGRADING
index 953866a9a1..138add6ae4 100644
--- a/UPGRADING
+++ b/UPGRADING
@@ -25,6 +25,16 @@ PHP 7.2 UPGRADE NOTES
. is_object() will now return true for objects of class
__PHP_Incomplete_Class.
. Support for Netware operating systems have been removed.
+ . Casting arrays to objects (with (object) or settype()) will now covert
+ integer keys to string property names. This fixes the behaviour of previous
+ versions, where integer keys would become inaccessible properties with
+ integer names.
+ . Casting objects to arrays (with (object) or settype()), and retrieving
+ object properties in an array with get_object_vars(), will now convert
+ numeric string property names (that is, property names of the format
+ /^(0|(-?[1-9][0-9]*))$/ where PHP_INT_MIN <= n <= PHP_INT_MAX) to integer
+ keys. This fixes the behaviour of previous versions, where numeric string
+ property names would become inaccessible string keys.
========================================
2. New Features