3v4l.org

run code in 300+ PHP versions simultaneously
<?php $func = function($a) { return $a + 2; }; $func = function($a) use($func) { return $func() * 2; } var_dump( $func(2) );
Output for 5.5.24 - 5.5.30, 5.6.8 - 5.6.15
Parse error: syntax error, unexpected 'var_dump' (T_STRING) in /in/JbuT1 on line 11
Process exited with code 255.

preferences:
168.24 ms | 1395 KiB | 22 Q