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

Free Zend 200-550 Practice Exam with Questions & Answers | Set: 4

Questions 31

What is the output of the following code?

try {

class MyException extends Exception {};

try {

throw new MyException;

}

catch (Exception $e) {

echo "1:";

throw $e;

}

catch (MyException $e) {

echo "2:";

throw $e;

}

}

catch (Exception $e) {

echo get_class($e);

}

Options:
A.

A parser error, try cannot be followed by multiple catch

B.

1:

C.

2:

D.

1:Exception

E.

1:MyException

F.

2:MyException

G.

MyException

Zend 200-550 Premium Access
Questions 32

Which of the following statements about PHP is false? (Choose 2)

Options:
A.

A final class can be derived.

B.

A final class may be instantiated.

C.

A class with a final function may be derived.

D.

Static functions can be final.

E.

Properties can be final.

Questions 33

What is the name of the method that can be used to provide read access to virtual properties in a class?

Options:
A.

__call()

B.

__get()

C.

__set()

D.

__wakeup()

E.

__fetch()

Questions 34

Which of the following rules must every correct XML document adhere to? (Choose 2)

Options:
A.

It has to be well-formed.

B.

It has to be valid.

C.

It has to be associated to a DTD.

D.

It may only contain UTF-8 encoded characters.

Questions 35

PHP's array functions such as array_values() can be used on an object if the object...

Options:
A.

implements Traversable

B.

is an instance of ArrayObject

C.

implements ArrayAccess

D.

None of the above

Questions 36

How can you determine whether a PHP script has already sent cookies to the client?

Options:
A.

Use $_COOKIE

B.

Use the getcookie() function

C.

Use the headers_sent() function

D.

Use JavaScript to send a second HTTP request

Questions 37

What is the pattern modifier for handling UTF-8 encoded preg_* functionality?

Options:
A.

e

B.

u

C.

PHP does not support UTF-8 encoded strings

D.

A pattern modifier is not needed

Questions 38

Consider the following code:

$result = $value1 ??? $value2;

Which operator needs to be used instead of ??? so that $result equals $value1 if $value1 evaluates to true, and equals $value2 otherwise? Just state the operator as it would be required in the code.

Options:
Questions 39

Which PHP function sets a cookie and URL encodes its value when sending it to the browser?

Options:
Questions 40

What is the output of the following code?

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

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

Options:
A.

abc

B.

cd

C.

0d