3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Foo{ public function __call($method, $args) { if(is_callable(array($this, $method))) { return call_user_func_array($this->$method, $args); } // else throw exception } } $c = function($who) { return "Hello $who"; }; echo $c->call(new Foo,'Wide World');
based on fTa8R
Output for 7.0.0 - 7.2.0
Hello Wide World
Output for 5.3.19 - 5.6.28
Fatal error: Call to undefined method Closure::call() in /in/e2EKF on line 13
Process exited with code 255.