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>
A. Nothing
B. NULL
C. A fatal error
D. $val
E. 10
One Comment on “What is the output of the following script?”
C
0
0