3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Foo { public function method () { return function () { var_dump(__FUNCTION__, __METHOD__); };} } $reflection = new ReflectionMethod(new Foo(), 'method'); var_dump(new ReflectionFunction($reflection->getClosure())->getClosureThis());
Output for 5.4.0 - 5.4.30
Parse error: syntax error, unexpected '->' (T_OBJECT_OPERATOR) in /in/EbdcK on line 8
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/EbdcK on line 8
Process exited with code 255.