$obj = new StdClass();
$obj->fn = new StdClass();
$obj->fn->move = function ($a, $b) {
print_r($this);
return $a * $b;
};
print_r($obj->fn->move(1,2));
Fatal error: Call to undefined method stdClass::move() in [file] on line [line]
$f = $obj->fn->move;
print_r($f(1,2));
$obj = new StdClass();
$obj->fn = new StdClass();
$obj->fn->move = function ($a, $b) {
print_r($this);
return $a * $b;
};
var_dump($obj->fn->move);
$move = $obj->fn->move;
$move(1,2);