Free 200-550 Exam Braindumps
Zend Certified PHP Engineer Questions 91–95 (page: 20)

Updated On: 9-Feb-2026

Which of the following is NOT a valid function declaration?

  1. function x ($x1 = array())
  2. function x (A $x1)
  3. function x (A $x1 = null)
  4. function x ($x1 = $x2)

Answer(s): D



CORRECT TEXT
What is the output of the following code?
function increment (&$val)
{
return $val + 1;
}
$a = 1;
echo increment ($a);
echo increment ($a);

  1. 22

Answer(s): A



Which of the following is true about stream contexts? (Choose 2)

  1. A context can modify or enhance the behavior of a stream
  2. A context indicates what session the stream is part of
  3. A context is a set of parameters and stream wrapper specific options
  4. Contexts are created with new Stream_Context();

Answer(s): A,C



Consider the following code. What can be said about the call to file_get_contents?
$getdata = "foo=bar";
$opts = array('http' =>
array(
'method' => 'POST',
'header' => 'Content-type: application/x-www-form-urlencoded',
'content' => $getdata
)
);
$context = stream_context_create($opts);
$result = file_get_contents('http://example.com/submit.php', false, $context);

  1. A GET request will be performed on http://example.com/submit.php
  2. A POST request will be performed on http://example.com/submit.php
  3. An error will be displayed

Answer(s): B



What function can be used to retrieve an array of current options for a stream context?

  1. stream_context_get_params
  2. stream_context_get_default
  3. stream_context_get_options
  4. The 'options' element of the stream_get_meta_data return value

Answer(s): C



Viewing page 20 of 46
Viewing questions 96 - 100 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!