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

Pearson 200-550 New Attempt

Page: 6 / 8
Total 223 questions

Zend Certified PHP Engineer Questions and Answers

Question 21

Which of the following methods are available to limit the amount of resources available to PHP through php.ini? (Choose 2)

Options:

A.

Limit the amount of memory a script can consume

B.

Limit the total amount of memory PHP uses on the entire server

C.

Limit the maximum execution time of a script

D.

Limit the maximum number of concurrent PHP processes

E.

Limit the maximum number of concurrent PHP threads

Question 22

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

Question 23

What will the $array array contain at the end of this script?

function modifyArray (&$array)

{

foreach ($array as &$value)

{

$value = $value + 1;

}

$value = $value + 2;

}

$array = array (1, 2, 3);

modifyArray($array);

Options:

A.

2, 3, 4

B.

2, 3, 6

C.

4, 5, 6

D.

1, 2, 3

Question 24

Consider the following code. What change must be made to the class for the code to work as written?

class Magic {

protected $v = array("a" => 1, "b" => 2, "c" => 3);

public function __get($v) {

return $this->v[$v];

}

}

$m = new Magic();

$m->d[] = 4;

echo $m->d[0];

Options:

A.

Nothing, this code works just fine.

B.

Add __set method doing $this->v[$var] = $val

C.

Rewrite __get as: public function __get(&$v)

D.

Rewrite __get as: public function &__get($v)

E.

Make __get method static

Page: 6 / 8
Total 223 questions