3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $currencies = [ '840' => [ name => 'USD', demonimator => 100, ], '392' => [ name => 'JPY', demonimator => 1, ], ]; var_dump( array_column($currencies, name) );
based on ltBZ0
Output for 7.2.0
Warning: Use of undefined constant name - assumed 'name' (this will throw an Error in a future version of PHP) in /in/JJ5hI on line 4 Warning: Use of undefined constant demonimator - assumed 'demonimator' (this will throw an Error in a future version of PHP) in /in/JJ5hI on line 5 Warning: Use of undefined constant name - assumed 'name' (this will throw an Error in a future version of PHP) in /in/JJ5hI on line 8 Warning: Use of undefined constant demonimator - assumed 'demonimator' (this will throw an Error in a future version of PHP) in /in/JJ5hI on line 9 Warning: Use of undefined constant name - assumed 'name' (this will throw an Error in a future version of PHP) in /in/JJ5hI on line 13 array(2) { [0]=> string(3) "USD" [1]=> string(3) "JPY" }
Output for 5.5.24 - 7.1.10
Notice: Use of undefined constant name - assumed 'name' in /in/JJ5hI on line 4 Notice: Use of undefined constant demonimator - assumed 'demonimator' in /in/JJ5hI on line 5 Notice: Use of undefined constant name - assumed 'name' in /in/JJ5hI on line 8 Notice: Use of undefined constant demonimator - assumed 'demonimator' in /in/JJ5hI on line 9 Notice: Use of undefined constant name - assumed 'name' in /in/JJ5hI on line 13 array(2) { [0]=> string(3) "USD" [1]=> string(3) "JPY" }
Output for 5.4.11 - 5.4.45
Notice: Use of undefined constant name - assumed 'name' in /in/JJ5hI on line 4 Notice: Use of undefined constant demonimator - assumed 'demonimator' in /in/JJ5hI on line 5 Notice: Use of undefined constant name - assumed 'name' in /in/JJ5hI on line 8 Notice: Use of undefined constant demonimator - assumed 'demonimator' in /in/JJ5hI on line 9 Fatal error: Call to undefined function array_column() in /in/JJ5hI on line 13
Process exited with code 255.
Output for 5.3.21 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/JJ5hI on line 2
Process exited with code 255.