How should class MyObject be defined for the following code to work properly? Assume $array is an
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);
A . MyObject should extend class Closure
B . MyObject should implement interface Callable
C . MyObject should implement method _call
D . MyObject should implement method _invoke
Answer: D
Subscribe
Login
0 Comments
Inline Feedbacks
View all comments