3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $foo = null; $foo = function() use (&$foo){ var_dump($foo); return $foo; }; ($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* } }
Output for hhvm-3.12.0
object(Closure$;1369227146$50f88fb73118a2f1e785274ff7878029$)#1 (1) { ["static"]=> array(1) { ["foo"]=> *RECURSION* } } object(Closure$;1369227146$50f88fb73118a2f1e785274ff7878029$)#1 (1) { ["static"]=> array(1) { ["foo"]=> *RECURSION* } }
Output for hhvm-3.10.0
object(Closure$;1369227146$62c542ab663d0618cd9c939fd5b47211$)#1 (1) { ["static"]=> array(1) { ["foo"]=> *RECURSION* } } object(Closure$;1369227146$62c542ab663d0618cd9c939fd5b47211$)#1 (1) { ["static"]=> array(1) { ["foo"]=> *RECURSION* } }
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* } } } }
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.