3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $foo = null; $foo = function() use (&$foo){ var_dump($foo); }; ($foo()->__invoke()==$foo);
Output for 7.0.0 - 7.1.0
object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> *RECURSION* } } Fatal error: Uncaught Error: Call to a member function __invoke() on null in /in/PQCAv:6 Stack trace: #0 {main} thrown in /in/PQCAv on line 6
Process exited with code 255.
Output for hhvm-3.12.0
object(Closure$;1590642796$97fad9cdc27a8266bfd608902e65e634$)#1 (1) { ["static"]=> array(1) { ["foo"]=> *RECURSION* } } Fatal error: Uncaught exception 'BadMethodCallException' with message 'Call to a member function __invoke() on a non-object (null)' in /in/PQCAv:6 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.10.0
object(Closure$;1590642796$753b908a46e1c4354322902b67a53374$)#1 (1) { ["static"]=> array(1) { ["foo"]=> *RECURSION* } } Fatal error: Uncaught exception 'BadMethodCallException' with message 'Call to a member function __invoke() on a non-object (null)' in /in/PQCAv:6 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.6.8 - 5.6.28
object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> *RECURSION* } } Fatal error: Call to a member function __invoke() on null in /in/PQCAv on line 6
Process exited with code 255.
Output for 5.3.3 - 5.5.35
object(Closure)#1 (1) { ["static"]=> array(1) { ["foo"]=> *RECURSION* } } Fatal error: Call to a member function __invoke() on a non-object in /in/PQCAv on line 6
Process exited with code 255.
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* } } } } Fatal error: Call to a member function __invoke() on a non-object in /in/PQCAv on line 6
Process exited with code 255.
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.