3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class closurecaller { public function callByClosure() { } public function callClosure() { $closure = function() { $this->callByClosure(); } call_user_func($closure); } } $cc = new closurecaller(); $cc->callClosure();
Output for 5.4.0 - 5.4.17
Parse error: syntax error, unexpected 'call_user_func' (T_STRING) in /in/XVh3W on line 16
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_STRING in /in/XVh3W on line 16
Process exited with code 255.