<?php trait ClosureMethods { function __get($method){ return function(...$args) use($method){ return $this->$method(...$args); }; } } class Foo { use ClosureMethods; function baz(int $a, int $b){ return $a + $b; } } $foo = new Foo; $methodRef = $foo->baz; var_dump($methodRef(10, 20));
You have javascript disabled. You will not be able to edit any code.
Value for `_results` contains invalid data `array`