Winter Special Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: bigdisc65

Zend 200-550 Actual Questions

Page: 6 / 8
Question 24

How can a SimpleXML object be converted to a DOM object?

Options:

A.

dom_import_simplexml()

B.

dom_export_simplexml()

C.

simplexml_import_dom()

D.

SimpleXML2Dom()

E.

None of the above.

Question 25

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

Options:

A.

ob_start()

B.

set_write_buffer()

C.

stream_set_write_buffer()

D.

Change the output_buffering INI setting via ini_set() function

Question 26

Given the following code, what is correct?

function f(stdClass &$x = NULL) { $x = 42; }

$z = new stdClass;

f($z);

var_dump($z);

Options:

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

Question 27

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);

try {

$cmd = "INSERT INTO users (id, name, email) VALUES (:id, :name, :email)";

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

$stmt->bindValue('id', 1);

$stmt->bindValue('name', 'anna');

$stmt->bindValue('email', 'alpha@example.com');

$stmt->execute();

echo "Success!";

} catch (PDOException $e) {

echo "Failure!";

throw $e;

}

Options:

A.

The INSERT will succeed and the user will see the "Success!" message.

B.

The INSERT will fail because of a primary key violation, and the user will see the "Success!" message.

C.

The INSERT will fail because of a primary key violation, and the user will see a PDO warning message.

D.

The INSERT will fail because of a primary key violation, and the user will see the "Failure!" message.

Page: 6 / 8
Exam Code: 200-550
Exam Name: Zend Certified PHP Engineer
Last Update: Nov 21, 2024
Questions: 223
200-550 pdf

200-550 PDF

$28  $80
200-550 Engine

200-550 Testing Engine

$33.25  $95
200-550 PDF + Engine

200-550 PDF + Testing Engine

$45.5  $130