3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class C { var $p; function m($v) { echo $this->p, $v, "\n"; } } function f($c) { $c = $c[0]->{$c[1]}; for($i=0; $i<10; ++$i) $c($i); } $c = new C(); $c->p = 'X'; f(array(&$c, 'm'));
based on H0OqY
Output for 7.0.0 - 7.2.0
Notice: Undefined property: C::$m in /in/M9CdL on line 16 Fatal error: Uncaught Error: Function name must be a string in /in/M9CdL:18 Stack trace: #0 /in/M9CdL(24): f(NULL) #1 {main} thrown in /in/M9CdL on line 18
Process exited with code 255.
Output for 5.3.21 - 5.6.28
Notice: Undefined property: C::$m in /in/M9CdL on line 16 Fatal error: Function name must be a string in /in/M9CdL on line 18
Process exited with code 255.