Free 200-550 Exam Braindumps
Zend Certified PHP Engineer Questions 86–90 (page: 19)

Updated On: 9-Feb-2026

How do you allow the caller to submit a variable number of arguments to a function?

  1. Using a prototype like function test(... $parameters).
  2. Using a prototype like function test() and the function func_get_args() inside the function body.
  3. Using a prototype like function test($parameters[]).
  4. Using a prototype like function test() and the function get_variable_args() inside the function body.
  5. This is not possible in PHP.

Answer(s): B



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

  1. 2, 3, 4
  2. 2, 3, 6
  3. 4, 5, 6
  4. 1, 2, 3

Answer(s): B



What is the output of the following code?
class a
{
public $val;
}
function renderVal (a $a)
{
if ($a) {
echo $a->val;
}
}
renderVal (null);

  1. A syntax error in the function declaration line
  2. An error, because null is not an instance of 'a'
  3. Nothing, because a null value is being passed to renderVal()
  4. NULL

Answer(s): B



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() . ', ';
}

  1. An error
  2. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  3. 1, 1, 2, 3, 5, 8, 13, 21, 34, 55,
  4. Nothing

Answer(s): B



What is the output of the following code?
function ratio ($x1 = 10, $x2)
{
if (isset ($x2)) {
return $x2 / $x1;
}
}
echo ratio (0);

  1. 0
  2. An integer overflow error
  3. A warning, because $x1 is not set
  4. A warning, because $x2 is not set
  5. A floating-point overflow error
  6. Nothing

Answer(s): D



Viewing page 19 of 46
Viewing questions 91 - 95 out of 223 questions


Post your Comments and Discuss Zend 200-550 exam prep with other Community members:

AI Tutor AI Tutor 👋 I’m here to help!