Zend 200-550 - Zend Certified PHP Engineer Exam
Page: 3 / 45
Total 223 questions
Question #11 (Topic: )
What is the output of the following code?
echo "22" + "0.2", 23 . 1;
echo "22" + "0.2", 23 . 1;
A. 220.2231
B. 22.2231
C. 22.2,231
D. 56.2
Answer: B
Question #12 (Topic: )
What is the output of the following code?
$first = "second";
$second = "first";
echo $$$first;
$first = "second";
$second = "first";
echo $$$first;
A. "first"
B. "second"
C. an empty string
D. an error
Answer: B
Question #13 (Topic: )
Your supervisor wants you to disallow PHP scripts to open remote HTTP and FTP
resources using PHP's file functions. Which php.ini setting should you change accordingly?
resources using PHP's file functions. Which php.ini setting should you change accordingly?
Answer: allow_url_fopen, allow_url_fopen=off, allow_url_fopen=Off, allow_url_fopen = off,
allow_url_fopen = Off
Question #14 (Topic: )
Which of the following code snippets DO NOT write the exact content of the file "source.txt"
to "target.txt"? (Choose 2)
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
Question #15 (Topic: )
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