Zend 200-550 Exam
Zend Certified PHP Engineer (Page 11 )

Updated On: 1-Feb-2026

Late static binding is used in PHP to:

  1. Load dynamic libraries and extensions at runtime
  2. Use caller class information provided in static method call
  3. Resolve undefined class names by automatically including needed files
  4. Find proper method to call according to the call arguments

Answer(s): B



What is the output of the following code?
class Test {
public function __call($name, $args)
{
call_user_func_array(array('static', "test$name"), $args);
}
public function testS($l) {
echo "$l, ";
}
}
class Test2 extends Test {
public function testS($l) {
echo "$l, $l, ";
}
}
$test = new Test2();
$test->S('A');

  1. A,
  2. A, A,
  3. A, A, A,
  4. PHP Warning: call_user_func_array() expects parameter 1 to be a valid callback

Answer(s): B



Which of the following tasks can be achieved by using magic methods? (Choose 3)

  1. Initializing or uninitializing object data
  2. Creating a new stream wrapper
  3. Creating an iterable object
  4. Processing access to undefined methods or properties
  5. Overloading operators like +, *, etc.
  6. Converting objects to string representation

Answer(s): A,D,F



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);

  1. MyObject should extend class Closure
  2. MyObject should implement interface Callable
  3. MyObject should implement method __call
  4. MyObject should implement method __invoke

Answer(s): D



Consider the following code. What change must be made to the class for the code to work as written?
class Magic {
protected $v = array("a" => 1, "b" => 2, "c" => 3);
public function __get($v) {
return $this->v[$v];
}
}
$m = new Magic();
$m->d[] = 4;
echo $m->d[0];

  1. Nothing, this code works just fine.
  2. Add __set method doing $this->v[$var] = $val
  3. Rewrite __get as: public function __get(&$v)
  4. Rewrite __get as: public function &__get($v)
  5. Make __get method static

Answer(s): D



Viewing page 11 of 46
Viewing questions 51 - 55 out of 223 questions



Post your Comments and Discuss Zend 200-550 exam prep with other Community members:

Join the 200-550 Discussion