Official 2014 Latest Zend 200-550 Demo Free Download!

QUESTION 1
What is the result of the following bitwise operation in PHP?
1 ^ 2

A.    1
B.    3
C.    2
D.    4
E.    -1

Answer: B

QUESTION 2
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

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

QUESTION 4
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?
Answer: allow_url_fopen, allow_url_fopen=off, allow_url_fopen=Off, allow_url_fopen = off, allow_url_fopen = Off

QUESTION 5
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: BC

QUESTION 6
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

QUESTION 7
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

QUESTION 8
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

QUESTION 9
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

QUESTION 10
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: AB

QUESTION 11
What purpose do namespaces fulfill?

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

Answer: A

QUESTION 12
When would you use classes and when would you use namespaces?

A.    Use classes to encapsulate code and represent objects, and namespaces to avoid symbol name collisions
B.    Use classes for performance-sensitive code, and namespaces when readability matters more
C.    Use namespaces for performance-sensitive code, and classes when readability matters more
D.    Always use them; namespaces are always superior to classes

Answer: A

QUESTION 13
Which of these elements can be encapsulated by namespaces and made accessible from the outside?

A.    Only classes
B.    Classes, functions and constants
C.    Classes, functions, constants and variables

Answer: B

If you want to pass the Zend 200-550 Exam sucessfully, recommend to read latest Zend 200-550 Demo full version.


Official 2014 Latest Zend 200-500 Demo Free Download(11-15)!

QUESTION 11
Which piece of code will return the ASCII value of a character?

A.    (int)’t’;
B.    ord(‘t’);
C.    to_ascii(‘t’);
D.    chr(‘t’);

Answer: B

QUESTION 12
Which of the following data types cannot be directly manipulated by the client?

A.    Cookie Data
B.    Session Data
C.    Remote IP Address
D.    User Agent

Answer: B

QUESTION 13
An HTML form contains this form element:
<input type=”image” name=”myImage” src=”image.png” />
The user clicks on the image to submit the form. How can you now access the relative coordinates of the mouse click?

A.    $_IMAGE[‘myImage’][‘x’] and $_IMAGE[‘myImage’][‘y’]
B.    $_POST[‘myImage’][‘x’] and $_POST[‘myImage’][‘x’]
C.    $_POST[‘myImage.x’] and $_POST[‘myImage.y’]
D.    $_POST[‘myImage_x’] and $_POST[‘myImage_y’]

Answer: D

QUESTION 14
Which of the following statements is correct?

A.    Interfaces can extend only one interface
B.    Interfaces can extend more than one interface
C.    Interfaces can inherit a method from different interfaces
D.    Interfaces can redeclare inherited methods

Answer: B

QUESTION 15
You are creating an application that generates invoices in a variety of formats, including PDF, ODS and HTML. Each of these formats is represented as a PHP class in your application. While some of the operations can be performed on all of the different formats (such as saving and loading), other operations may be specific to one or two of the formats (such as setting as read only). Which design pattern should you use for this application?

A.    Adapter
B.    Factory
C.    MVC
D.    Singleton

Answer: B

If you want to pass the Zend 200-500 Exam sucessfully, recommend to read latest Zend 200-500 Demo full version.


2014 Latest Zend 200-500 Demo Free Download!(8-15)

QUESTION 8
What is the maximum size of the VARCHAR column type?

A.    255 Bytes
B.    255 Characters
C.    512 Bytes
D.    512 Characters
E.    No Limit

Answer: B

QUESTION 9
What is the output of the following code?
<code>
class test {
public $value = 0;
function test() {
$this->value = 1;
} function __construct() {
$this->value = 2;
}}
$object = new test();
echo $object->value;

A.    2
B.    1
C.    0
D.    3
E.    No Output, PHP will generate an error message.

Answer: A

QUESTION 10
Transactions can be used to: (Choose 2)

A.    Recover from errors in case of a power outage or a failure in the SQL connection
B.    Ensure that the data is properly formatted
C.    Ensure that either all statements are performed properly, or that none of them are.
D.    Recover from user errors

Answer: AC

QUESTION 11
Which piece of code will return the ASCII value of a character?

A.    (int)’t’;
B.    ord(‘t’);
C.    to_ascii(‘t’);
D.    chr(‘t’);

Answer: B

QUESTION 12
Which of the following data types cannot be directly manipulated by the client?

A.    Cookie Data
B.    Session Data
C.    Remote IP Address
D.    User Agent

Answer: B

QUESTION 13
An HTML form contains this form element:
<input type=”image” name=”myImage” src=”image.png” />
The user clicks on the image to submit the form. How can you now access the relative coordinates of the mouse click?

A.    $_IMAGE[‘myImage’][‘x’] and $_IMAGE[‘myImage’][‘y’]
B.    $_POST[‘myImage’][‘x’] and $_POST[‘myImage’][‘x’]
C.    $_POST[‘myImage.x’] and $_POST[‘myImage.y’]
D.    $_POST[‘myImage_x’] and $_POST[‘myImage_y’]

Answer: D

QUESTION 14
Which of the following statements is correct?

A.    Interfaces can extend only one interface
B.    Interfaces can extend more than one interface
C.    Interfaces can inherit a method from different interfaces
D.    Interfaces can redeclare inherited methods

Answer: B

QUESTION 15
You are creating an application that generates invoices in a variety of formats, including PDF, ODS and HTML. Each of these formats is represented as a PHP class in your application. While some of the operations can be performed on all of the different formats (such as saving and loading), other operations may be specific to one or two of the formats (such as setting as read only). Which design pattern should you use for this application?

A.    Adapter
B.    Factory
C.    MVC
D.    Singleton

Answer: B

If you want to pass the Zend 200-500 Exam sucessfully, recommend to read latest Zend200-500 Demo full version.