3v4l.org

run code in 200+ 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 - 7.2.0
object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> *RECURSION* } } object(Closure)#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.