3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $person = ['a', 'b', 'c']; $names = array_map( function($person) { return $person[0]; }, $user_meta );
based on eDERu
Output for 7.0.20, 7.1.5 - 7.2.0
Notice: Undefined variable: user_meta in /in/QaNZR on line 5 Warning: array_map(): Argument #2 should be an array in /in/QaNZR on line 5
Output for 7.0.0 - 7.0.6, 7.1.0
Notice: Undefined variable: user_meta in /in/QaNZR on line 4 Warning: array_map(): Argument #2 should be an array in /in/QaNZR on line 4
Output for 5.4.2 - 5.6.28
Notice: Undefined variable: user_meta in /in/QaNZR on line 6 Warning: array_map(): Argument #2 should be an array in /in/QaNZR on line 6
Output for 5.3.17 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/QaNZR on line 2
Process exited with code 255.