3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $objs = json_decode('"obj":{"a":{"key":"a", value:2}, "b":{"key":"b", value:3}}', true); var_dump($objs); $objs = array_column($objs, null, "key"); $objs['a']['value'] = 5; var_dump($objs);
based on 7tJl0
Output for 5.6.38 - 7.3.0rc3
NULL Warning: array_column() expects parameter 1 to be array, null given in /in/fvZ8pu on line 5 array(1) { ["a"]=> array(1) { ["value"]=> int(5) } }