3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = new stdClass; $b = new stdClass; $a->name = 'A'; $b->name = 'B'; $foos = [$a, $b]; var_dump(array_column($foos, 'name'));
Output for 7.0.0 - 7.2.0
array(2) { [0]=> string(1) "A" [1]=> string(1) "B" }
Output for 5.5.24 - 5.6.28
array(0) { }
Output for 5.4.12 - 5.4.45
Fatal error: Call to undefined function array_column() in /in/Gp0Y1 on line 11
Process exited with code 255.
Output for 5.3.22 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/Gp0Y1 on line 9
Process exited with code 255.