Weekend Sale - Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: xmaspas7

Easiest Solution 2 Pass Your Certification Exams

200-500 Zend PHP 5 Certification Free Practice Exam Questions (2025 Updated)

Prepare effectively for your Zend 200-500 Zend PHP 5 Certification 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 219 questions

How can a PHP extension be loaded? (Choose 2)

A.

ini_set("extension", "extension.so");

B.

dl("extension.so");

C.

extension_load("extension.so");

D.

extension=extension.so inside php.ini

What type of class definition can be used to define multiple inheritance?

A.

Class

B.

Abstract

C.

Interface

D.

Final

What is the return value of the following code: substr_compare("foobar", "bar", 3);

A.

-1

B.

1

C.

TRUE

D.

0

E.

FALSE

What is the output of the following script?

1

2 class a

3 {

4 public $val = 10;

5 }

6

7 function renderVal (a $a)

8 {

9 return $a->$val;

10 }

11

12 renderVal (new a);

13 ?>

A.

Nothing

B.

NULL

C.

A fatal error

D.

$val

E.

10

What is the best way to run PHP 4 and PHP 5 side-by-side on the same Apache server?

A.

Run one as an Apache module, the other as a CGI binary.

B.

Run both as a CGI binary.

C.

Just use .php4 for PHP 4, and .php for PHP 5.

D.

Use .php for both but use different document roots.

What function is ideal for outputting contents of a static file to screen?

A.

file_get_contents()

B.

readfile()

C.

fread()

D.

include()

E.

require()

F.

file()

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

A.

TRUE

B.

FALSE

What happens if you try to access a property whose name is defined in a parent class as private, and is not declared in the current class?

A.

An E_NOTICE error will be triggered.

B.

An E_ERROR error will be triggered.

C.

An E_WARNING error will be triggered.

D.

No errors will be triggered

The constructs for(), foreach(), and each() can all be used to iterate an object if the object

A.

implements ArrayAccess

B.

implements Iterator

C.

implements Iterator and ArrayAccess

D.

None of the above

What will the following function call print?

printf('%010.6f', 22);

A.

22

B.

22.00

C.

022.000000

D.

22.000000

What will be the output of the following code?

$a = array(0, 1, 2 => array(3, 4));

$a[3] = array(4, 5);

echo count($a, 1);

A.

4

B.

5

C.

8

D.

None of the above

What is the method used to execute XPath queries in the SimpleXML extension?

A.

xpathQuery()

B.

xpath()

C.

simpleXMLXpath()

D.

query()

E.

evaluate()

What is the length of a string returned by: md5(rand(), TRUE);

A.

Depends on the value returned by rand() function

B.

32

C.

24

D.

16

E.

64

An object can be counted with count() and sizeof() if it

A.

implements ArrayAccess

B.

has a public __count() method

C.

was cast to an object from an array

D.

None of the above

Which of the following keywords is not new in PHP 5?

A.

implements

B.

instanceof

C.

static

D.

abstract

You want to test if a string matches a relatively complex pattern. Which of the following functions can you use? (Choose 2)

A.

match()

B.

preg_match()

C.

ereg()

D.

regex()

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 2.17of the following formats is used to describe web services?

A.

WSDL

B.

UDDI

C.

SOAP

D.

XLANG

What is the purpose of the open_basedir directive?

A.

Provide a list of directories where PHP should search for files.

B.

Provide a list of directories from which PHP can open files.

C.

Provide a list of directories from which PHP cannot open files.

D.

Directory where the PHP extensions can be found.

Which of the following superglobals does not contain data from the client?

A.

$_POST

B.

$_SESSION

C.

$_GET

D.

$_SERVER

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