adplus-dvertising
frame-decoration

Question

What will be the output of the following PHP code ?
<?php
const $b = 1;
switch($b)
{
case 1:
    print "hi";
    break;
case 1:
    print "hello";
    break;
default:
    print "hi1";
}
?>

a.

error

b.

hi

c.

hihello

d.

hello

Posted under PHP

Answer: (a).error

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 ?