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) { for($i=0; $i<10; ++$i) $c[0]->$c[1]($i); } $c = new C(); $c->p = 'X'; f(array(&$c, 'm'));
based on KfEWD
Output for 7.0.0 - 7.2.6
Notice: Array to string conversion in /in/p3ZCk on line 17 Notice: Undefined property: C::$Array in /in/p3ZCk on line 17 Fatal error: Uncaught Error: Function name must be a string in /in/p3ZCk:17 Stack trace: #0 /in/p3ZCk(23): f(Array) #1 {main} thrown in /in/p3ZCk on line 17
Process exited with code 255.
Output for 5.3.21 - 5.6.28
X0 X1 X2 X3 X4 X5 X6 X7 X8 X9