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, $x2)
3 {
4 return $x1 + $x2;
5 }
6
7 $x1 = 0;
8 $x2 = 1;
9
10 for ($i = 0; $i < 10; $i++) {
11 echo fibonacci($x1, $x2) . ‘,’;
12 }
13 ?>
</code>

PrepAway - Latest Free Exam Questions & Answers

A.
1,2,3,4,5,6,7,8,9

B.
1,2,3,4,5,6,7,8,9,10,

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

D.
1,1,1,1,1,1,1,1,1,1,

One Comment on “What is the output of the following script? <code> 1 <?


Leave a Reply

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