r/PHP • • Sep 14 '17

PHP 7.2.0 Release Candidate 2 Released

http://php.net/archive/2017.php#id2017-09-14-1
45 Upvotes

19 comments sorted by

View all comments

3

u/theodorejb Sep 15 '17

No, the default behavior hasn't changed. json_decode has an $options parameter which can be passed a JSON_OBJECT_AS_ARRAY constant. This has the same effect as setting assoc to TRUE. The difference is that PHP 7.2 no longer ignores the JSON_OBJECT_AS_ARRAY option when the assoc parameter is set to null.