nerdexam
Zend

200-530 · Question #458

200-530 Question #458: Real Exam Question with Answer & Explanation

The correct answer is A. To catch undefined methods. See the full explanation below for the reasoning.

Question

You run the following PHP script: <?php class Test { function __call( $var1, $var2 ) { $check = " '$var1' called<br />\n"; $check = print_r( $var2, true ); return $check; } } $item = new Test(); print $item->array( "John", "Maria", "Jason" ); ?> What is the work of the __call() method in the above script?

Options

  • ATo catch undefined methods
  • BTo catch undefined variables
  • CTo define undefined objects
  • DTo catch undefined objects

Community Discussion

No community discussion yet for this question.

Full 200-530 Practice