PrepAway - Latest Free Exam Questions & Answers

What is the output of the following code?

What is the output of the following code? class a { public $val; } function renderVal (a $a) { if
($a) { echo $a->val; } } renderVal (null);

PrepAway - Latest Free Exam Questions & Answers

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


Leave a Reply

Your email address will not be published. Required fields are marked *