PrepAway - Latest Free Exam Questions & Answers

What is the output of the following script? <code> 1 <?

What is the output of the following script?
<code>
1 <?php
2 function fibonacci (&$x1 = 0, &$x2 = 1)
3 {
4 $result = $x1 + $x2;
5 $x1 = $x2;
6 $x2 = $result;
7
8 return $result;
9 }
10
11 for ($i = 0; $i < 10; $i++) {
12 echo fibonacci() . ‘,’;
13 }
14 ?>
</code>

PrepAway - Latest Free Exam Questions & Answers

A.
An error

B.
1,1,1,1,1,1,1,1,1,1,

C.
1,1,2,3,5,8,13,21,34,55,

D.
Nothing


Leave a Reply

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