Weekend Special 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: sale65best

Free Zend 200-550 Practice Exam with Questions & Answers

Questions 1

What is the output of the following code?

$text = 'This is text';

$text1 = <<<'TEXT'

$text

TEXT;

$text2 = <<

$text1

TEXT;

echo "$text2";

Options:
A.

This is text

B.

$text

C.

$text1

D.

$text2

Zend 200-550 Premium Access
Questions 2

An HTML form contains this form element:

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

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

move_uploaded_file(

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

'uploads/' . $_FILES['myFile']['name']

);

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 3

Assuming UTF-8 encoding, what is the value of $count?

$data = '$1ā2';

$count = strlen($data);

Options:
A.

0

B.

4

C.

5

D.

7

Questions 4

Which of the following statements about anonymous functions in PHP are NOT true? (Choose 2)

Options:
A.

Anonymous functions can be bound to objects

B.

Anonymous functions created within object context are always bound to that object

C.

Assigning closure to a property of an object binds it to that object

D.

Methods bind() and bindTo() of the Closure object provide means to create closures with different binding and scope

E.

Binding defines the value of $this and the scope for a closure

Questions 5

What is the output of the following code?

echo "1" + 2 * "0x02";

Options:
A.

1

B.

3

C.

5

D.

20

E.

7

Questions 6

When tracking upload progress with sessions, the values of 2 INI settings are needed to determine the key in $_SESSION of the upload progress data. What are the INI settings? (Choose 2)

Options:
A.

session.upload_progress.file

B.

session.upload_progress.key

C.

session.upload_progress.prefix

D.

session.upload_progress.freq

E.

session.upload_progress.name

Questions 7

Which of the following PHP values may NOT be encoded to a JavaScript literal using PHP's ext/json capabilities?

Options:
A.

'Hello, world!'

B.

function(){ alert("Hello, world!"); }

C.

array('Hello, world!')

D.

array('message' => 'Hello, world!')

Questions 8

What is the output of the following code?

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

Options:
A.

220.2231

B.

22.2231

C.

22.2,231

D.

56.2

Questions 9

In order to create an object storage where each object would be stored only once, you may use which of the following? (Choose 2)

Options:
A.

SplFixedArray

B.

SplObjectStorage

C.

SplString

D.

spl_object_hash

E.

spl_same_object

Questions 10

Which of the following statements are FALSE?

Options:
A.

SimpleXML allows removal of attributes.

B.

SimpleXML allows addition of new attributes.

C.

SimpleXML allows removal of nodes.

D.

SimpleXML allows addition of new nodes.

E.

None of the above