Pass the Zend PHP and Zend Framework Certifications 200-550 Questions and answers with CertsForce

Viewing page 7 out of 7 pages
Viewing questions 61-70 out of questions
Questions # 61:

What is the output of the following code?

$first = "second";

$second = "first";

echo $$$first;

Options:

A.

"first"


B.

"second"


C.

an empty string


D.

an error


Expert Solution
Questions # 62:

Late static binding is used in PHP to:

Options:

A.

Load dynamic libraries and extensions at runtime


B.

Use caller class information provided in static method call


C.

Resolve undefined class names by automatically including needed files


D.

Find proper method to call according to the call arguments


Expert Solution
Questions # 63:

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


Expert Solution
Questions # 64:

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


Expert Solution
Questions # 65:

What will be the output value of the following code?

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

while (list(,$v) = each($array));

var_dump(current($array));

Options:

A.

bool(false)


B.

int(3)


C.

int(1)


D.

NULL


E.

Array


Expert Solution
Questions # 66:

What is the result of the following code?

define('PI', 3.14);

class T

{

const PI = PI;

}

class Math

{

const PI = T::PI;

}

echo Math::PI;

Options:

A.

Parse error


B.

3.14


C.

PI


D.

T::PI


Expert Solution
Viewing page 7 out of 7 pages
Viewing questions 61-70 out of questions