Given the following code, what is correct?
function f(stdClass &$x = NULL) { $x = 42; }
$z = new stdClass;
f($z);
var_dump($z);
Error: Typehints cannot be NULL
Error: Typehints cannot be references
Result is NULL
Result is object of type stdClass
Result is 42
Submit