3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { public function Q() { $f = function() { var_dump($this); }; } } $a = A(); $a->Q();
Output for 7.0.0 - 7.3.0
Fatal error: Uncaught Error: Call to undefined function A() in /in/uqIbR:13 Stack trace: #0 {main} thrown in /in/uqIbR on line 13
Process exited with code 255.
Output for hhvm-3.22.0
Fatal error: Uncaught Error: Call to undefined function A() in /in/uqIbR:-1 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.15.4 - 3.18.4, hhvm-3.19.2 - 3.21.3
Fatal error: Uncaught Error: Call to undefined function A() in /in/uqIbR:13 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.18.5
Fatal error: Uncaught Error: Call to undefined function A() in /in/uqIbR:2 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.6.30 - 5.6.38
Fatal error: Call to undefined function A() in /in/uqIbR on line 13
Process exited with code 255.