adplus-dvertising
frame-decoration

Question

What will be the output of the following PHP code ?
<?php
$a = array("hi", "hello", "bye");
for (;count($a) < 5;) 
{
    if (count($a) == 3)
     print $a;         
}
?>

a.

ArrayArrayArrayArrayArrayArray….infinitely

b.

(“hi”,”hello”,”bye”)(“hi”,”hello”,”bye”)(“hi”,”hello”,”bye”)(“hi”,”hello”,”bye”)…infinitely

c.

hihellobyehihellobyehihellobyehihellobyehihellobyehihellobye…..infinitely

d.

no output

Answer: (a).ArrayArrayArrayArrayArrayArray….infinitely

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 ?