nerdexam
Zend

200-530 · Question #458

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()…

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

How the community answered

(53 responses)
  • A
    75% (40)
  • B
    6% (3)
  • C
    15% (8)
  • D
    4% (2)

Community Discussion

No community discussion yet for this question.

Full 200-530 Practice