3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { public $x; public function foo() { ($this->x)(42); } } $a = new A; $a->x = function($v) {var_dump($v);}; $a->foo();
based on HYiYm
Output for 7.0.0 - 7.2.0
int(42)
Output for 5.3.18 - 5.6.28
Parse error: syntax error, unexpected '(' in /in/Gru6m on line 6
Process exited with code 255.