adplus-dvertising
frame-decoration

Question

What will be the output of the following PHP code ?
<?php
for ($i = 0; -5 ; $i++)
{
    print"i";
    if ($i == 3)
        break;
}
?>

a.

0 1 2 3 4

b.

0 1 2 3

c.

0 1 2 3 4 5

d.

error

Answer: (b).0 1 2 3

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What will be the output of the following PHP code ?