zend 200-550 practice test

Exam Title: Zend Framework 2

Last update: Nov 27 ,2025
Question 1

What is the output of the following code?
echo "22" + "0.2", 23 . 1;

  • A. 220.2231
  • B. 22.2231
  • C. 22.2,231
  • D. 56.2
Answer:

B

vote your answer:
A
B
C
D
A 0 B 0 C 0 D 0
Comments
Question 2

What is the output of the following code?
$first = "second";
$second = "first";
echo $$$first;

  • A. "first"
  • B. "second"
  • C. an empty string
  • D. an error
Answer:

B

vote your answer:
A
B
C
D
A 0 B 0 C 0 D 0
Comments
Question 3

What is the output of the following code?
$first = "second";
$second = "first";
echo $$$first;

  • A. "first"
  • B. "second"
  • C. an empty string
  • D. an error
Answer:

B

vote your answer:
A
B
C
D
A 0 B 0 C 0 D 0
Comments
Question 4

Which of the following code snippets DO NOT write the exact content of the file "source.txt" to
"target.txt"? (Choose 2)

  • A. file_put_contents("target.txt", fopen("source.txt", "r"));
  • B. file_put_contents("target.txt", readfile("source.txt"));
  • C. file_put_contents("target.txt", join(file("source.txt"), "\n"));
  • D. file_put_contents("target.txt", file_get_contents("source.txt")); E: $handle = fopen("target.txt", "w+"); fwrite($handle, file_get_contents("source.txt")); fclose($handle);
Answer:

B, C

vote your answer:
A
B
C
D
A 0 B 0 C 0 D 0
Comments
Question 5

What is the recommended method of copying data between two opened files?

  • A. copy($source_file, $destination_file);
  • B. copy($destination_file, $source_file);
  • C. stream_copy_to_stream($source_file, $destination_file);
  • D. stream_copy_to_stream($destination_file, $source_file); E: stream_bucket_prepend($source_file, $destination_file);
Answer:

C

vote your answer:
A
B
C
D
A 0 B 0 C 0 D 0
Comments
Question 6

Which of the following will set a 10 seconds read timeout for a stream?

  • A. ini_set("default_socket_timeout", 10);
  • B. stream_read_timeout($stream, 10);
  • C. Specify the timeout as the 5th parameter to the fsockopen() function used to open a stream
  • D. stream_set_timeout($stream, 10); E: None of the above
Answer:

D

vote your answer:
A
B
C
D
A 0 B 0 C 0 D 0
Comments
Question 7

What function allows resizing of PHP's file write buffer?

  • A. ob_start()
  • B. set_write_buffer()
  • C. stream_set_write_buffer()
  • D. Change the output_buffering INI setting via ini_set() function
Answer:

C

vote your answer:
A
B
C
D
A 0 B 0 C 0 D 0
Comments
Question 8

What does the __FILE__ constant contain?

  • A. The filename of the current script.
  • B. The full path to the current script.
  • C. The URL of the request made.
  • D. The path to the main script.
Answer:

B

vote your answer:
A
B
C
D
A 0 B 0 C 0 D 0
Comments
Question 9

What can prevent PHP from being able to open a file on the hard drive (Choose 2)?

  • A. File system permissions
  • B. File is outside of open_basedir
  • C. File is inside the /tmp directory.
  • D. PHP is running in CGI mode.
Answer:

A, B

vote your answer:
A
B
C
D
A 0 B 0 C 0 D 0
Comments
Question 10

What purpose do namespaces fulfill?

  • A. Encapsulation
  • B. Alternative to classes
  • C. Improved performance
  • D. All of the above
Answer:

A

vote your answer:
A
B
C
D
A 0 B 0 C 0 D 0
Comments
Page 1 out of 22
Viewing questions 1-10 out of 221
Go To
page 2