Zend Certified PHP Engineer 200-550 Question # 23 Topic 3 Discussion

Zend Certified PHP Engineer 200-550 Question # 23 Topic 3 Discussion

200-550 Exam Topic 3 Question 23 Discussion:
Question #: 23
Topic #: 3

Given the following code, what is correct?

function f(stdClass &$x = NULL) { $x = 42; }

$z = new stdClass;

f($z);

var_dump($z);


A.

Error: Typehints cannot be NULL


B.

Error: Typehints cannot be references


C.

Result is NULL


D.

Result is object of type stdClass


E.

Result is 42


Get Premium 200-550 Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.