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]])); var_dump($res); } 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 km5Km
Output for 7.1.0 - 7.2.0
Warning: Cannot call extract() dynamically in /in/dsptb on line 5 array(1) { [0]=> NULL } Notice: Undefined variable: res in /in/dsptb on line 6 NULL
Output for 5.4.11 - 7.0.20
array(1) { [0]=> int(1) } int(123)
Output for 5.3.21 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/dsptb on line 5
Process exited with code 255.