diff options
author | Andrea Faulds <ajf@ajf.me> | 2016-11-14 18:20:45 +0000 |
---|---|---|
committer | Andrea Faulds <ajf@ajf.me> | 2016-11-14 18:20:45 +0000 |
commit | a0502b89a65d24eb191a7c85bcffcf9b91454735 (patch) | |
tree | e40f7d1cf796b71b4d137939623ef6e32041665b /UPGRADING | |
parent | 531eedf38ffe127e80c4286588212211b59d4db6 (diff) | |
download | php-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-- | UPGRADING | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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 |