Summer Sale Special Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: s2p65

Easiest Solution 2 Pass Your Certification Exams

200-550 Zend Certified PHP Engineer Free Practice Exam Questions (2025 Updated)

Prepare effectively for your Zend 200-550 Zend Certified PHP Engineer certification with our extensive collection of free, high-quality practice questions. Each question is designed to mirror the actual exam format and objectives, complete with comprehensive answers and detailed explanations. Our materials are regularly updated for 2025, ensuring you have the most current resources to build confidence and succeed on your first attempt.

Page: 1 / 4
Total 223 questions

What DOM method is used to load HTML files?

A.

load()

B.

loadXML()

C.

loadHTML()

D.

loadHTMLFile()

What SimpleXML function is used to parse a file?

A.

simplexml_load_file()

B.

simplexml_load_string()

C.

load()

D.

loadFile()

E.

loadXML()

F.

None of the above.

What is the output of the following code?

class a

{

public $val;

}

function renderVal (a $a)

{

if ($a) {

echo $a->val;

}

}

renderVal (null);

A.

A syntax error in the function declaration line

B.

An error, because null is not an instance of 'a'

C.

Nothing, because a null value is being passed to renderVal()

D.

NULL

What will the following code piece print?

echo strtr('Apples and bananas', 'ae', 'ea')

A.

Applas end benenes

B.

Epplas end benenes

C.

Apples and bananas

D.

Applas end bananas

Which of the following statements about PHP is false? (Choose 2)

A.

A final class can be derived.

B.

A final class may be instantiated.

C.

A class with a final function may be derived.

D.

Static functions can be final.

E.

Properties can be final.

Consider the following table data and PHP code. What is a possible 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 name, email FROM users LIMIT 1";

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

$stmt->execute();

$result = $stmt->fetchAll(PDO::FETCH_BOTH);

$row = $result[0];

A.

The value of $row is `array(0 => 'anna', 1 => 'alpha@example.com')`.

B.

The value of $row is `array('name' => 'anna', 'email' => 'alpha@example.com')`.

C.

The value of $row is `array(0 => 'anna', 'name' => 'anna', 1 => 'alpha@example.com', 'email' => 'alpha@example.com')`.

D.

The value of $result is `array('anna' => 'alpha@example.com')`.

Given the default PHP configuration, how can all of the parameters provided via GET be accessed in a form of a string?

A.

$_GET['ALL']

B.

$_SERVER['QUERY']

C.

$_SERVER['QUERY_STRING']

D.

$_ENV['QUERY']

E.

$QUERY_STRING

What is the output of the following code?

class Foo Implements ArrayAccess {

function offsetExists($k) { return true;}

function offsetGet($k) {return 'a';}

function offsetSet($k, $v) {}

function offsetUnset($k) {}

}

$x = new Foo();

echo array_key_exists('foo', $x)?'true':'false';

A.

true

B.

false

How many elements does the $matches array contain after the following function call is performed?

preg_match('/^(\d{1,2}([a-z]+))(?:\s*)\S+ (?=201[0-9])/', '21st March 2014', $matches);

A.

1

B.

2

C.

3

D.

4

Which interfaces could class C implement in order to allow each statement in the following code to work? (Choose 2)

$obj = new C();

foreach ($obj as $x => $y) {

echo $x, $y;

}

A.

Iterator

B.

ArrayAccess

C.

IteratorAggregate

D.

ArrayObject

Which of the following statements is NOT correct?

A.

Only methods can have type hints

B.

Typehints can be optional

C.

Typehints can be references

Which of the following statements is NOT true?

A.

Class constants are public

B.

Class constants are being inherited

C.

Class constants can omit initialization (default to NULL)

D.

Class constants can be initialized by const

Which of the following rules must every correct XML document adhere to? (Choose 2)

A.

It has to be well-formed.

B.

It has to be valid.

C.

It has to be associated to a DTD.

D.

It may only contain UTF-8 encoded characters.

Which of the following is NOT true about PHP traits? (Choose 2)

A.

Multiple traits can be used by a single class.

B.

A trait can implement an interface.

C.

A trait can declare a private variable.

D.

Traits are able to be auto-loaded.

E.

Traits automatically resolve conflicts based on definition order.

You work for a shared hosting provider, and your supervisor asks you to disable user scripts to dynamically load PHP extensions using the dl() function. How can you do this? (Choose 2)

A.

Set enable_dl to Off in the server's php.ini configuration file.

B.

Add dl to the current value of disable_functions in the server's php.ini configuration file.

C.

Add dl to the current value of disable_classes in the server's php.ini configuration file.

D.

Write a custom function called dl() , save it under the name prepend.inc and then set the auto_prepend_file directive to prepend.inc in php.ini.

When a query that is supposed to affect rows is executed as part of a transaction, and reports no affected rows, it could mean that: (Choose 2)

A.

The transaction failed

B.

The transaction affected no lines

C.

The transaction was rolled back

D.

The transaction was committed without error

Which of the following filtering techniques prevents all cross-site scripting (XSS) vulnerabilities?

A.

Strip all occurrences of the string

Page: 1 / 4
Total 223 questions
Copyright © 2014-2025 Solution2Pass. All Rights Reserved