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'), 'foo');
Output for 5.6.30
array(3) { [0]=> int(1) [1]=> int(3) [2]=> int(2) } string(3) "foo"