How should class MyObject be defined for the following code to work properly? Assume $array is an array and MyObject is a user-defined class.
$obj = new MyObject();
array_walk($array, $obj);
MyObject should extend class Closure
MyObject should implement interface Callable
MyObject should implement method __call
MyObject should implement method __invoke
Submit