Zend Certified Engineer 200-710 Exam Practice Test

Page: 1 / 14
Total 232 questions
Question 1

What will the $array array contain at the end of this script?

function modifyArray (&$array)

{

foreach ($array as &$value)

{

$value = $value + 1;

}

$value = $value + 2;

}

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

modifyArray($array);



Answer : B


Question 2

What is the output of the following code?

var_dump(boolval(new StdClass()));



Answer : A


Question 3

What is the output of the following code?

var_dump(boolval([]));



Answer : B


Question 4

Consider the following code:

$result = $value1 ??? $value2;

Which operator needs to be used instead of ??? so that $result equals $value1 if $value1 evaluates to true, and equals $value2 otherwise? Just state the operator as it would be required in the code.

See Below Explanation:




Answer : A


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

What will be the result of the following operation?

$a = array_merge([1,2,3] + [4=>1,5,6]);

echo $a[2];



Answer : B


Question 7

What will be the result of the following operation?

array_combine(array("A","B","C"), array(1,2,3));



Answer : C


Page:    1 / 14   
Total 232 questions