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: 2 / 4
Total 223 questions

Which of these databases is NOT supported by a PDO driver?

A.

Microsoft SQL Server

B.

SQLite

C.

Microsoft Access

D.

Berkeley DB

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

Which class of HTTP status codes is used for server error conditions?

A.

2XX

B.

3XX

C.

4XX

D.

5XX

What is the output of the following code?

for ($i = 0; $i < 1.02; $i += 0.17) {

$a[$i] = $i;

}

echo count($a);

A.

0

B.

1

C.

2

D.

6

E.

7

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

Which of these statements about PDO is NOT true?

A.

PDO has built-in support for Large Objects (LOBs).

B.

Placeholders within PDO prepared statements need to be named.

C.

When something goes wrong, PDO can throw an instance of its own exception class.

D.

PDO does not emulate missing database features.

Which of the following may be used in conjunction with CASE inside a SWITCH statement?

A.

A scalar

B.

An expression

C.

A boolean

D.

All of the above

Which of the following is correct? (Choose 2)

A.

A class can extend more than one class.

B.

A class can implement more than one class.

C.

A class can extend more than one interface.

D.

A class can implement more than one interface.

E.

An interface can extend more than one interface.

F.

An interface can implement more than one interface.

What is the difference between "print" and "echo"?

A.

There is no difference.

B.

Print has a return value, echo does not

C.

Echo has a return value, print does not

D.

Print buffers the output, while echo does not

E.

None of the above

Given the following code, what will the output be:

trait MyTrait {

private $abc = 1;

public function increment() {

$this->abc++;

}

public function getValue() {

return $this->abc;

}

}

class MyClass {

use MyTrait;

public function incrementBy2() {

$this->increment();

$this->abc++;

}

}

$c = new MyClass;

$c->incrementBy2();

var_dump($c->getValue());

A.

Fatal error: Access to private variable MyTrait::$abc from context MyClass

B.

Notice: Undefined property MyClass::$abc

C.

int(2)

D.

int(3)

E.

NULL

Which parts of the text are matched in the following regular expression?

$text = <<

The big bang bonged under the bung.

EOT;

preg_match_all('@b.n?g@', $text, $matches);

A.

bang bong bung

B.

bang bonged bung

C.

big bang bong bung

D.

big bang bung

Under what condition may HTTP headers be set from PHP if there is content echoed prior to the header function being used?

A.

headers_sent() returns true

B.

Output buffering is enabled

C.

The client supports local buffering

D.

The webserver uses preemptive mode

When a browser requests an image identified by an img tag, it never sends a Cookie header.

A.

TRUE

B.

FALSE

What is the output of the following code?

$a = 3;

switch ($a) {

case 1: echo 'one'; break;

case 2: echo 'two'; break;

default: echo 'four'; break;

case 3: echo 'three'; break;

}

A.

one

B.

two

C.

three

D.

four

The XML document below has been parsed into $xml via SimpleXML. How can the value of tag accessed?

Value

A.

$xml->bar['foo']

B.

$xml->bar->foo

C.

$xml['document']['bar']['foo']

D.

$xml->document->bar->foo

E.

$xml->getElementByName('foo');

What is the output of the following code?

var_dump(boolval(new StdClass()));

A.

bool(true)

B.

bool(false)

One common security risk is exposing error messages directly in the browser. Which PHP configuration directive can be disabled to prevent this?

A.

html_display

B.

error_reporting

C.

display_errors

D.

error_log

E.

ignore_repeated_errors

Given a JSON-encoded string, which code sample correctly indicates how to decode the string to native PHP values?

A.

$json = new Json($jsonValue); $value = $json->decode();

B.

$value = Json::decode($jsonValue);

C.

$value = json_decode($jsonValue);

D.

$value = Json::fromJson($jsonValue);

Which of the following expressions will evaluate to a random value from an array below?

$array = array("Sue","Mary","John","Anna");

A.

array_rand($array);

B.

array_rand($array, 1);

C.

shuffle($array);

D.

$array[array_rand($array)];

E.

array_values($array, ARRAY_RANDOM);

Which of the following statements about exceptions is correct? (Choose 2)

A.

you can only throw classes derived from Exception

B.

a try block can have multiple catch blocks

C.

a try block must not be followed by a catch block

D.

try blocks cannot contain nested try blocks

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