<?php
function call($o, $a, $r, $context) {
return call_user_func_array($o, $a);
}
class A
{
protected $a = 5;
protected function dd() {
return 'protected';
}
public function __invoke()
{
$f = function () {
return $this->a;
};
//return call($f, array(), array(), isset($this) ? $this : null);
return call(array($this, 'dd'), array(), array(), isset($this) ? $this : null);
}
}
$a = new A;
var_dump($a());
preferences:
71.79 ms | 402 KiB | 5 Q