3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $foo = null; $foo = function() use (&$foo){ var_dump($foo); return $foo; }; var_dump($foo()->__invoke()==$foo);
Output for 5.3.3 - 5.6.28, 7.0.0 - 7.1.0
object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> *RECURSION* } } object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> *RECURSION* } } bool(true)
Output for hhvm-3.12.0
object(Closure$;2137585619$fe79073daaa7d032cccd6b3665977729$)#1 (1) { ["static"]=> array(1) { ["foo"]=> *RECURSION* } } object(Closure$;2137585619$fe79073daaa7d032cccd6b3665977729$)#1 (1) { ["static"]=> array(1) { ["foo"]=> *RECURSION* } } bool(true)
Output for hhvm-3.10.0
object(Closure$;2137585619$97eb5c4c72a126f9d4fc2dade7cbc8a8$)#1 (1) { ["static"]=> array(1) { ["foo"]=> *RECURSION* } } object(Closure$;2137585619$97eb5c4c72a126f9d4fc2dade7cbc8a8$)#1 (1) { ["static"]=> array(1) { ["foo"]=> *RECURSION* } } bool(true)
Output for 5.3.1 - 5.3.2
object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> *RECURSION* } } } } object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> *RECURSION* } } } } bool(true)
Output for 5.3.0
object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> &object(Closure)#1 (1) {
Process exited with code 137.