3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $promos = [ '123' => ['weight' => 1], '234' => ['weight' => 3], '345' => ['weight' => 2], ]; var_dump(array_column($promos, 'weight', $promos));
Output for 5.6.30
Warning: array_column(): The index key should be either a string or an integer in /in/l7NcV on line 9 bool(false)