200-710 Zend Certified Engineer

Loading demo links...

Showing 10–12 of 15 questions

Question 10

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

Select an option, then click Submit answer.

  • 5

  • 10

  • 50

  • Fatal error

Question 11

What is the name of the header used to require HTTP authentication?

Select an option, then click Submit answer.

  • Authorization-Required

  • WWW-Authenticate

  • HTTP-Authenticate

  • Authentication-Required
    E: HTTP-Auth

Question 12

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

Select an option, then click Submit answer.

  • A,

  • A,A,

  • A,A,A,

  • PHP Warning: call_user_func_array() expects parameter 1 to be a valid callback