3v4l.org

run code in 200+ PHP versions simultaneously
<?php $x = false; (function () use ($x) { $x = true; })(); var_dump( $x );
based on XWUDg
Output for 7.0.0 - 7.3.1
bool(false)
Output for 5.6.0 - 5.6.30
Parse error: syntax error, unexpected '(' in /in/uXhtd on line 4
Process exited with code 255.