3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class C { function foo() { return function() { var_export($this); } } } $c = new C; $f = $c->foo(); $f();
based on 9jN8c
Output for 7.0.0 - 7.0.1
Parse error: syntax error, unexpected '}', expecting ';' in /in/cVBGb on line 8
Process exited with code 255.
Output for 5.3.21 - 5.6.16
Parse error: syntax error, unexpected '}' in /in/cVBGb on line 8
Process exited with code 255.