What is the output of the following code?

What is the output of the following code?

function fibonacci (&$xl = 0, &$x2 = 1)

{

$result= $xl + $x2;

$xl = $x2;

$x2 = $result;

return $result;

for ($i = 0; $i < 10; $i++) {

echo fibonacci() . ‘,’;

}
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

Answer: B

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments