3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function test(&$error) { $response = (object)array(); $fail = function($err) { use $error; $error[] = $err; return $response; }; return $fail('invalid derp'); } $error = array(); test($error); var_dump($error);
Output for 5.4.0 - 5.4.23
Parse error: syntax error, unexpected 'use' (T_USE) in /in/G3dK8 on line 7
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_USE in /in/G3dK8 on line 7
Process exited with code 255.