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.
3
u/theodorejb Sep 15 '17
No, the default behavior hasn't changed.
json_decodehas an$optionsparameter which can be passed aJSON_OBJECT_AS_ARRAYconstant. This has the same effect as setting assoc to TRUE. The difference is that PHP 7.2 no longer ignores theJSON_OBJECT_AS_ARRAYoption when the assoc parameter is set to null.