3v4l.org

run code in 300+ PHP versions simultaneously
<?php $thing = function() { return "thing value"; }(); echo $thing; // expected to be "thing value" for PHP 7
Output for 5.4.8 - 5.4.45, 5.5.24 - 5.5.30, 5.6.8 - 5.6.14
Parse error: syntax error, unexpected '(' in /in/dYeUl on line 4
Process exited with code 255.

preferences:
183.02 ms | 1387 KiB | 58 Q