
Zend-Technologies Zend Certified Engineer - 200-710 Exam Questions
QUESTION NO: 1
Given the following DateTime objects, what can you use to compare the two dates and indicate that
$ date2 is the later of the two dates?
$ datel = new DateTime('2014-02-03');
$ date2 = new DateTime('2014-03-02');
Given the following DateTime objects, what can you use to compare the two dates and indicate that
$ date2 is the later of the two dates?
$ datel = new DateTime('2014-02-03');
$ date2 = new DateTime('2014-03-02');
Correct Answer: D
QUESTION NO: 2
What will the $array array contain at the end of this script?
function modifyArray (&$array)
{
for each ($array as &$value)
{
$ value= $value+ 1;
$ value= $value+ 2;
$ array= array (1, 2, 3);
modifyArray($array);
What will the $array array contain at the end of this script?
function modifyArray (&$array)
{
for each ($array as &$value)
{
$ value= $value+ 1;
$ value= $value+ 2;
$ array= array (1, 2, 3);
modifyArray($array);
Correct Answer: B
QUESTION NO: 3
What is the output of the following code?
try {
}
class MyException extends Exception {};
try {
throw new MyException;
}
catch (Exception $e) {
echo "1:";
throw $e;
}
catch (MyException $e) {
echo "2:";
throw $e;
}
catch (Exception $e) {
echo get_class($e);
}
What is the output of the following code?
try {
}
class MyException extends Exception {};
try {
throw new MyException;
}
catch (Exception $e) {
echo "1:";
throw $e;
}
catch (MyException $e) {
echo "2:";
throw $e;
}
catch (Exception $e) {
echo get_class($e);
}
Correct Answer: C
QUESTION NO: 4
What is the output of the following code?
var_dump(boolval(new StdClass()));
What is the output of the following code?
var_dump(boolval(new StdClass()));
Correct Answer: B
QUESTION NO: 5
Please provide the value of the $code variable in the following statement to set an HTTP status code that
signifies that the requested resource was not found.
http_response_code($code);
Please provide the value of the $code variable in the following statement to set an HTTP status code that
signifies that the requested resource was not found.
http_response_code($code);
Correct Answer:
404, 404 Not Found
QUESTION NO: 6
What is the return value of the following code: substr _compare("foobar", "bar", 3);
What is the return value of the following code: substr _compare("foobar", "bar", 3);
Correct Answer: A
QUESTION NO: 7
What is the output of the following code?
class A {
public $a= 1;
public function _construct($a) { $this->a = $a; }
public function mul() {
}
return function($x) {
return $this->a*$x;
};
$ a= new A(2);
$ a->mul = function($x) {
return $x*$x;
};
$ m = $a->mul();
echo $m(3);
What is the output of the following code?
class A {
public $a= 1;
public function _construct($a) { $this->a = $a; }
public function mul() {
}
return function($x) {
return $this->a*$x;
};
$ a= new A(2);
$ a->mul = function($x) {
return $x*$x;
};
$ m = $a->mul();
echo $m(3);
Correct Answer: C
QUESTION NO: 8
What is the difference between the spaceship operator(<=>) and the strcmp() function?
What is the difference between the spaceship operator(<=>) and the strcmp() function?
Correct Answer: C
QUESTION NO: 9
In order to create an object storage where each object would be stored only once, you may use which of
the following? (Choose 2)
In order to create an object storage where each object would be stored only once, you may use which of
the following? (Choose 2)
Correct Answer: B,D
QUESTION NO: 10
Which of the following statements about exceptions is correct? (Choose 2)
Which of the following statements about exceptions is correct? (Choose 2)
Correct Answer: A,C
QUESTION NO: 11
When tracking upload progress with sessions, the values of 2 INI settings are needed to determine the
key in $_SESSION of the upload progress data. What are the INI settings? (Choose 2)
When tracking upload progress with sessions, the values of 2 INI settings are needed to determine the
key in $_SESSION of the upload progress data. What are the INI settings? (Choose 2)
Correct Answer: A,C
QUESTION NO: 12
What function can be used to retrieve an array of current options for a stream context?
What function can be used to retrieve an array of current options for a stream context?
Correct Answer: C
QUESTION NO: 13
What will the following function call print?
printf('%010.6f', 22);
What will the following function call print?
printf('%010.6f', 22);
Correct Answer: C
QUESTION NO: 14
Which of the following are NOT acceptable ways to create a secure password hash in PHP? (Choose 2)
Which of the following are NOT acceptable ways to create a secure password hash in PHP? (Choose 2)
Correct Answer: B,E




