3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Foo{ public function __call($n,$a){ return $this->$n->call($this,...$a); } } $f=new Foo(); $f->b=function($x){return$x;}; var_dump($f->b(7));
based on XTKSc
Output for 7.0.0 - 7.2.0
int(7)
Output for 5.6.8 - 5.6.28
Fatal error: Call to undefined method Closure::call() in /in/4n6Em on line 5
Process exited with code 255.
Output for 5.3.22 - 5.5.35
Parse error: syntax error, unexpected '.' in /in/4n6Em on line 5
Process exited with code 255.