PrepAway - Latest Free Exam Questions & Answers

What is the output of the following script?

What is the output of the following script?
<code>
1 <?php
2 class a
3 {
4 public $val = 10;
5 }
6
7 function renderVal (a $a)

8 {
9 return $a->$val;
10 }
11
12 renderVal (new a);
13 ?>
</code>

PrepAway - Latest Free Exam Questions & Answers

A.
Nothing

B.
NULL

C.
A fatal error

D.
$val

E.
10

2 Comments on “What is the output of the following script?


Leave a Reply

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