3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = array_map(function($a) { return array_column($a, null); }, [['a' => 1], ['b' => 2]]); var_dump($a);
based on cAK4i
Output for 7.0.0 - 7.2.0
array(2) { [0]=> array(1) { [0]=> int(1) } [1]=> array(1) { [0]=> int(2) } }
Output for 5.5.24 - 5.6.28
array(2) { [0]=> array(0) { } [1]=> array(0) { } }
Output for 5.4.0 - 5.4.45
Fatal error: Call to undefined function array_column() in /in/Lr2S6 on line 4
Process exited with code 255.
Output for 5.3.19 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/Lr2S6 on line 5
Process exited with code 255.