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

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

Questions 51

Which string will be returned by the following function call?

$test = '/etc/conf.d/wireless';

substr($test, strrpos($test, '/')); // note that strrpos() is being called, and not strpos()

Options:
A.

""

B.

"/wireless"

C.

"wireless"

D.

"/conf.d/wireless"

E.

"/etc"

Zend 200-550 Premium Access
Questions 52

Which of the following code snippets is correct? (Choose 2)

Options:
A.

interface Drawable {

abstract function draw();

}

B.

interface Point {

function getX();

function getY();

}

C.

interface Line extends Point {

function getX2();

function getY2();

}

D.

interface Circle implements Point {

function getRadius();

}

Questions 53

SimpleXML provides the ability to iterate over items in an XML document, as well as access items within it as if they were object properties. When creating your own classes to access data, implementing which of the following would NOT achieve this goal?

Options:
A.

__toString

B.

Iterator

C.

__get/__set

D.

ArrayAccess

Questions 54

What is the output of the following code?

class C {

public $x = 1;

function __construct() { ++$this->x; }

function __invoke() { return ++$this->x; }

function __toString() { return (string) --$this->x; }

}

$obj = new C();

echo $obj();

Options:
A.

0

B.

1

C.

2

D.

3

Questions 55

What SimpleXML function is used to parse a file?

Options:
A.

simplexml_load_file()

B.

simplexml_load_string()

C.

load()

D.

loadFile()

E.

loadXML()

F.

None of the above.

Questions 56

What is the output of the following code?

class a

{

public $val;

}

function renderVal (a $a)

{

if ($a) {

echo $a->val;

}

}

renderVal (null);

Options:
A.

A syntax error in the function declaration line

B.

An error, because null is not an instance of 'a'

C.

Nothing, because a null value is being passed to renderVal()

D.

NULL

Questions 57

Which of the following is NOT a requirement for file uploads to work?

Options:
A.

The PHP directive file_uploads must be set to On

B.

The form's method attribute must be set to "post"

C.

The form must include a hidden input element with the name set to "MAX_FILE_SIZE"

D.

The form's enctype attribute must be set to "multipart/form-data"

Questions 58

How many times will the function counter() be executed in the following code?

function counter($start, &$stop)

{

if ($stop > $start)

{

return;

}

counter($start--, ++$stop);

}

$start = 5;

$stop = 2;

counter($start, $stop);

Options:
A.

3

B.

4

C.

5

D.

6

Questions 59

Which of the following is correct? (Choose 2)

Options:
A.

A class can extend more than one class.

B.

A class can implement more than one class.

C.

A class can extend more than one interface.

D.

A class can implement more than one interface.

E.

An interface can extend more than one interface.

F.

An interface can implement more than one interface.

Questions 60

What will the following code print out?

$str = '✔ one of the following';

echo str_replace('✔', 'Check', $str);

Options:
A.

Check one of the following

B.

one of the following

C.

✔ one of the following