Limited-Time Offer: Enjoy 50% Savings! Ends in 00h 00m 00s Coupon code: 50OFF
Skip to content

Free Zend Certified Engineer 200-710 Exam Questions

Page: 1 / 16 Total 232 questions

Want more questions? Get Premium Access.

Question 1

Which value will be assigned to the key 0 in this example?

$foo = array(true, '0' => false, false => true);

Correct Answer: A. true

Question 2

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

Correct Answer: D. Rewrite __get as: public function &__get($v)

Question 3

What will be the output value of the following code?

$array = array(1,2,3);

while (list(,$v) = each($array));

var_dump(current($array));

Correct Answer: A. bool(false)

Question 4

Which of the following can NOT be used to send a cookie from within a PHP application?

Correct Answer: B. $_COOKIE

Question 5

What is the output of the following code?

function fibonacci (&$x1 = 0, &$x2 = 1)

{

$result = $x1 + $x2;

$x1 = $x2;

$x2 = $result;

return $result;

}

for ($i = 0; $i < 10; $i++) {

echo fibonacci() . ',';

}

Correct Answer: B. 1,1,1,1,1,1,1,1,1,1,

Question 6

Given a php.ini setting of

default_charset = utf-8

what will the following code print in the browser?

header('Content-Type: text/html; charset=iso-8859-1');

echo '✂✔✝';

Correct Answer: A. Three Unicode characters, or unreadable text, depending on the browser

Question 7

Which class of HTTP status codes is used for redirections?

Correct Answer: B. 3XX

Question 8

Under what condition may HTTP headers be set from PHP if there is content echoed prior to the header function being used?

Correct Answer: B. Output buffering is enabled

Question 9

What is the result of the following code?

class T

{

const A = 42 + 1;

}

echo T::A;

Correct Answer: C. Parse error

Question 10

Assuming UTF-8 encoding, what is the value of $count?

Correct Answer: C. 5

Question 11

An object can be counted with count() and sizeof() if it...

Correct Answer: D. None of the above

Question 12

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

Correct Answer: D. PHP_AUTH_PW; E. PHP_AUTH_USER

Question 13

What is the output of the following code?

$a = 'a'; $b = 'b';

echo isset($c) ? $a.$b.$c : ($c = 'c').'d';

Correct Answer: B. cd

Question 14

Which of the following filtering techniques prevents all cross-site scripting (XSS) vulnerabilities?

Correct Answer: D. None of the above.

Question 15

What is the method used to execute XPath queries in the SimpleXML extension?

Correct Answer: B. xpath()