3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php namespace Foo { function test($a, $b, $c) { var_dump(array_map('extract', [['res' => 123, 'k' => 123], []])); } test(1, 2, 3); } /*namespace { function test($a, $b, $c) { var_dump(call_user_func('func_get_args')); var_dump(call_user_func('get_defined_vars')); } test(1, 2, 3); }*/
based on 1rT6O
Output for 7.1.0 - 7.2.0
Warning: Cannot call extract() dynamically in /in/6i94k on line 5 Warning: Cannot call extract() dynamically in /in/6i94k on line 5 array(2) { [0]=> NULL [1]=> NULL }
Output for 5.4.11 - 7.0.20
array(2) { [0]=> int(2) [1]=> int(0) }
Output for 5.3.21 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/6i94k on line 5
Process exited with code 255.