3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { public function f() { $a = static function ($x) { var_dump($x); }; x(1); } } (new A())->f();
based on jEFvM
Output for 7.0.0 - 7.2.6
Fatal error: Uncaught Error: Call to undefined function x() in /in/1s7B7:6 Stack trace: #0 /in/1s7B7(10): A->f() #1 {main} thrown in /in/1s7B7 on line 6
Process exited with code 255.
Output for hhvm-3.15.4
Fatal error: Uncaught Error: Call to undefined function x() in /in/1s7B7:6 Stack trace: #0 /in/1s7B7(10): A->f() #1 {main}
Process exited with code 255.
Output for 5.6.0 - 5.6.30
Fatal error: Call to undefined function x() in /in/1s7B7 on line 6
Process exited with code 255.