Zend 200-710 Zend Certified Engineer Exam Practice Test

Page: 1 / 14
Total 232 questions
Question 1

Which of the following may be used in conjunction with CASE inside a SWITCH statement?



Answer : D


Question 2

What is the output of the following code?

class Number {

private $v;

private static $sv = 10;

public function __construct($v) { $this->v = $v; }

public function mul() {

return static function ($x) {

return isset($this) ? $this->v*$x : self::$sv*$x;

};

}

}

$one = new Number(1);

$two = new Number(2);

$double = $two->mul();

$x = Closure::bind($double, null, 'Number');

echo $x(5);



Answer : C


Question 3

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



Answer : B


Question 4

Which of the following items in the $_SERVER superglobal are important for authenticating the client when using HTTP Basic authentication? (Choose 2)



Answer : D, E


Question 5

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



Answer : D


Question 6

Which of the following statements is correct?



Answer : B


Question 7

What is the name of the PHP function used to automatically load non-yet defined classes?



Answer : B


Page:    1 / 14   
Total 232 questions