3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $x = 1; function foo($x) { return function () use ($x) { return $x; } } $y = foo(100); $z = foo($x); var_dump($y(), $z());
Output for 5.3.0 - 5.4.25
Parse error: syntax error, unexpected '}' in /in/J0WBb on line 10
Process exited with code 255.