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

Zend 200-500 Exam Made Easy: Step-by-Step Preparation Guide

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

Buy Now
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

Buy Now
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

Buy Now
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

Buy Now
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.

Buy Now
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()

Buy Now
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

Buy Now
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

Buy Now
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\>.

Buy Now
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

Buy Now
Exam Code: 200-500
Exam Name: Zend PHP 5 Certification
Last Update: Dec 12, 2024
Questions: 219

PDF + Testing Engine

$164.99
$66

Testing Engine

$124.99
$50

PDF (Q&A)

$104.99
$42