Examcollection offers free demo for 200-550 exam. "Zend Certified PHP Engineer", also known as 200-550 exam, is a Zend Technologies Certification. This set of posts, Passing the Zend Technologies 200-550 exam, will help you answer those questions. The 200-550 Questions & Answers covers all the knowledge points of the real exam. 100% real Zend Technologies 200-550 exams and revised by experts!

Q81. Transactions are used to...

A. guarantee high performance

B. secure data consistency

C. secure access to the database

D. reduce the database server overhead

E. reduce code size in PHP

Answer: B


Q82. What is the result of the following code?

define('PI', 3.14); class T

{

const PI = PI;

}

class Math

{

const PI = T::PI;

}

echo Math::PI;

A. Parse error

B. 3.14

C. PI

D. T::PI

Answer: B


Q83. Which of the following methods are available to limit the amount of resources available to PHP through php.ini? (Choose 2)

A. Limit the amount of memory a script can consume

B. Limit the total amount of memory PHP uses on the entire server

C. Limit the maximum execution time of a script

D. Limit the maximum number of concurrent PHP processes

E. Limit the maximum number of concurrent PHP threads

Answer: A,C


Q84. Which of the following PHP functions can be used to set the HTTP response code? (Choose 2)

A. header_add()

B. header()

C. http_set_status()

D. http_response_code()

E. http_header_set()

Answer: B,D


Q85. Consider the following table data and PHP code. What is the outcome? Table data (table name "users" with primary key "id"):

id name email

------- ----------- -------------------

1 anna alpha@example.com

2 betty beta@example.org

3 clara gamma@example.net

5 sue sigma@example.info

PHP code (assume the PDO connection is correctly established):

$dsn = 'mysql:host=localhost;dbname=exam'

$user = 'username'

$pass = '********'

$pdo = new PDO($dsn, $user, $pass);

$cmd = "SELECT * FROM users WHERE id = :id";

$stmt = $pdo->prepare($cmd);

$id = 3;

$stmt->bindParam('id', $id);

$stmt->execute();

$stmt->bindColumn(3, $result);

$row = $stmt->fetch(PDO::FETCH_BOUND);

A. The database will return no rows.

B. The value of $row will be an array.

C. The value of $result will be empty.

D. The value of $result will be 'gamma@example.net'.

Answer: D


Q86. What is the output of the following code? echo '1' . (print '2') + 3;

A. 123

B. 213

C. 142

D. 214

E. Syntax error

Answer: D


Q87. 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. $_FILES['myImage']['x'] and $_FILES['myImage']['y']

B. $_POST['myImage']['x'] and $_POST['myImage']['y']

C. $_POST['myImage.x'] and $_POST['myImage.y']

D. $_POST['myImage_x'] and $_POST['myImage_y']

Answer: D


Q88. Which is the most efficient way to determine if a key is present in an array, assuming the array has no NULL values?

A. in_array('key', array_keys($a))

B. isset($a['key'])

C. array_key_exists('key', $a)

D. None of the above

Answer: B


Q89. What is the name of the method that can be used to provide read access to virtual properties in a class?

A. call()

B. get()

C. set()

D. wakeup()

E. fetch()

Answer: B


Q90. What is the name of the function that allows you register a set of functions that implement user-defined session handling?

A. session_set_handler()

B. session_set_storage_handler()

C. session_register_handler()

D. session_set_save_handler()

Answer: D


Q91. Which of the following parts must a XML document have in order to be well-formed?

A. An XML declaration

B. A root element

C. A specified encoding

D. A reference to either a DTD or an XML schema definition

Answer: B


Q92. Which of the following statements about Reflection is correct?

A. Reflection is an extension that can be disabled

B. Reflection is a new extension present only in PHP 5.3+

C. Reflection only allows to reflect on built-in classes

D. Built-in classes can be reflected on command line using php --rc <classname>

Answer: D


Q93. Which sentence describes the following regular expression match? preg_match('/^\d+(?:\.[0-9]+)?$/', $test);

A. It matches float numbers with thousand seperators.

B. It matches float numbers without thousand seperators.

C. It matches binary integer numbers.

D. It matches any string.

E. It does not match anything

Answer: B


Q94. Given the following code, what is correct? function f(stdClass &$x = NULL) { $x = 42; }

$z = new stdClass; f($z); var_dump($z);

A. Error: Typehints cannot be NULL

B. Error: Typehints cannot be references

C. Result is NULL

D. Result is object of type stdClass

E. Result is 42

Answer: E


Q95. CORRECT TEXT

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


Q96. What parsing methodology is utilized by the SimpleXML extension?

A. SAX

B. DOM

C. XPath

D. Push/Pull Approach

E. Expat

Answer: B