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

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: 3 / 4
Total 219 questions

The following form is loaded in a recent browser and submitted, with the second list element selected:

<form method="post">

In the server-side PHP code to deal with the form data, what is the value of $_POST['list']?

A.

1

B.

2

C.

two

D.

null (since the value attribute of the list has not been set)

What is the output of the following code?

1 <?php

2 function append($str)

3 {

4 $str = $str.'append';

5 }

6

7 function prepend(&$str)

8 {

9 $str = 'prepend'.$str;

10 }

11

12 $string = 'zce';

13 append(prepend($string));

14 echo $string;

15 ?>

A.

zceappend

B.

prependzceappend

C.

prependzce

D.

zce

What tags can always be used to begin a PHP script (Choose 2)?

A.

<?php

B.

C.

<%

D.

<%php

E.

<script language="php">

Do constants have global scope or local scope?

A.

They have global scope

B.

They have local scope

C.

They have both global and local scope

D.

They have neither global nor local scope

What is the output of the following code?

1 <?php

2 $a = 'a'; $b = 'b';

3 echo isset($c) ? $a.$b.$c : ($c = 'c').'d';

4 ?>

A.

abc

B.

cd

C.

0d

What is the output of the following code?

echo "22" + "0.2", 23 . 1;

A.

220.2231

B.

22.2231

C.

22.2,231

D.

56.2

In the function setcookie() what does the 3rd parameter specify?

A.

The name of the cookie.

B.

The expiration time of the cookie.

C.

The value of the cookie.

D.

The IP address of the cookie's client.

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 XML declarations is NOT valid?

A.

B.

C.

D.

What is the name of the key pointing to the domain name in the array returned by parse_url()?

A.

domain

B.

path

C.

host

D.

2

E.

scheme

Which of the following is correct? (Choose 2)

1) A class can extend more than one class.

2) A class can implement more than one class.

3) A class can extend more than one interface.

4) A class can implement more than one interface.

5) An interface can extend more than one interface.

6) An interface can implement more than one interface.

A.

1)

B.

2)

C.

3)

D.

4)

E.

5)

F.

6)

What is the purpose of the 4th argument to the file_get_contents() function?

A.

Indicate the number of bytes to read

B.

Specifies the stream context

C.

Indicates whether or not include_path should be used

D.

Identifies the starting offset

E.

None of the above

In a shared hosting environment, session data can be read by PHP scripts written by any user. How can you prevent this?

A.

Store session data in a different location with session.save_path

B.

Store session data in a database.

C.

Enable safe_mode.

D.

Set session.name to something unique.

Which of the following statements are correct? (Choose 2)

A.

It is possible to specify more than one __autoload function

B.

__autoload receives the missing class name all lowercased

C.

__autoload is being called for missing interfaces

D.

Inside __autoload missing classes trigger __autoload

Which of the following is an invalid DOM save method?

A.

save()

B.

saveFile()

C.

saveXML()

D.

saveHTML()

E.

saveHTMLFile()

What is the output of the following code?

1 <?php

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

3 $a[$i] = $i;

4 }

5 echo count($a);

6 ?>

A.

0

B.

1

C.

2

D.

6

E.

7

When PHP is running on a command line, what super-global will contain the command line arguments specified?

A.

$_SERVER

B.

$_ENV

C.

$GLOBALS

D.

$_POST

E.

$_ARGV

After executing a query on a database server, PHP offers several functions to read the resulting lines, such as mysqli_fetch_assoc, pg_fetch_row, oci_fetch,etc.). If such functions do not return any rows, it means: (Choose 2)

A.

a SELECT statement returned no rows

B.

the transaction has been rolled back

C.

the connection to the database server was disconnected during query execution

D.

the query was too slow to execute

Which of the following functions are used to escape data within the context of HTML?

(Choose 2)

A.

htmlentities()

B.

addslashes()

C.

stripslashes()

D.

strip_tags()

E.

htmlspecialchars()

How many elements does the array $matches from the following code contain?

1 <?php

2 $str = "The cat sat on the roof of their house.";

3

4 $matches = preg_split("/(the)/i", $str, -1,

PREG_SPLIT_DELIM_CAPTURE);

5 ?>

A.

2

B.

3

C.

4

D.

7

E.

9

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