How should class MyObject be defined for the following code to work properly?

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

Download Printable PDF. VALID exam to help you PASS.

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.