Summer Special 60% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: bestdeal

Free Zend 200-500 Practice Exam with Questions & Answers | Set: 3

Questions 21

What is the output of the following code?

$a = 1;

++$a;

$a*=$a;

echo $a--;

Options:
A.

4

B.

3

C.

5

D.

0

E.

1

Zend 200-500 Premium Access
Questions 22

An HTML form contains this form element:

<input type="file" name="myFile" />

When this form is submitted, the following PHP code gets executed:

1

2 move_uploaded_file(

3 $_FILES['myFile']['tmp_name'],

4 'uploads/' . $_FILES['myFile']['name']);

5 ?>

Which of the following actions must be taken before this code may go into production?

(Choose 2)

Options:
A.

Check with is_uploaded_file() whether the uploaded file $_FILES['myFile']['tmp_name'] is valid

B.

Sanitize the file name in $_FILES['myFile']['name'] because this value is not consistent among web browsers

C.

Check the charset encoding of the HTTP request to see whether it matches the encoding of the uploaded file

D.

Sanitize the file name in $_FILES['myFile']['name'] because this value could be forged

E.

Use $HTTP_POST_FILES instead of $_FILES to maintain upwards compatibility

Questions 23

You are creating an application that repeatedly connects to a database to retrieve order data for invoices. All data comes from the same database. In order to preserve resources, you have to ensure that only one database connection should be used at any time. The code also has to open as few new database connections as possible. Which design pattern should you use for this scenario?

Options:
A.

Adapter

B.

Factory

C.

MVC

D.

Singleton

Questions 24

What will the following code piece print?

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

Options:
A.

Applas end benenes

B.

Epplas end benenes

C.

Apples and bananas

D.

Applas end bananas

Questions 25

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

Options:
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.

Questions 26

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

Options:
A.

match()

B.

preg_match()

C.

ereg()

D.

regex()

Questions 27

Which of the following statements is NOT correct?

Options:
A.

Only methods can have type hints

B.

Typehints can be optional

C.

Typehints can be references

Questions 28

What is the output of the following code?

1

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

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

4 ?>

Options:
A.

abc

B.

cd

C.

0d

Questions 29

What will the following code print?

echo addslashes('I am a small "HTML" string, which is

\'invalid\'.');

Options:
A.

I am a small "HTML" string, which is 'invalid'.

B.

I am a small \"HTML\" string, which is \'invalid\'.

C.

I am a small \"HTML\" string, which is \\'invalid\\'.

D.

I am a small \"HTML\" string, which is \\\'invalid\\\'.

E.

I am a \small\<\/b\> "HTML" string, which is 'invalid'\<\/u\>.

Questions 30

What is "instanceof" an example of:

Options:
A.

a boolean

B.

an operator

C.

a function

D.

a language construct

E.

a class magic

Exam Code: 200-500
Certification Provider: Zend
Exam Name: Zend PHP 5 Certification
Last Update: Jul 17, 2025
Questions: 219

Zend Related Exams

Zend Free Exams

Zend Free Exams
Enhance your Zend exam prep with free resources and practice tests from Examstrack. Achieve Zend certification success by exploring Examstrack.