<?php
class X {
public $call;
public function __construct() {
$this->call = function () { echo "x"; };
}
public function call($v) {
echo $v;
}
}
$object = new X;
[$object, 'call', ['b']]();
Fatal error: Uncaught Error: Array callback must have exactly two elements in /in/9GPe0:16
Stack trace:
#0 {main}
thrown in /in/9GPe0 on line 16
Process exited with code 255.
Fatal error: Uncaught Error: Function name must be a string in /in/9GPe0:16
Stack trace:
#0 {main}
thrown in /in/9GPe0 on line 16
Process exited with code 255.
Output for 5.5.0 - 5.5.38, 5.6.0 - 5.6.40
Parse error: syntax error, unexpected '(' in /in/9GPe0 on line 16
Process exited with code 255.