-
What will be the output of the following PHP code ?
<?php
$p = "1";
$p = 1;
$q = 1;
switch($p)
{
case $p * $q:
print "Hello";
break;
case $p / $q:
print "Hey";
break;
default:
print "Bye";
}
?>
-
- Hello
- Hey
- Bye
- Error
- None of these
Correct Option: A
It checks the first case, when it finds it equal it will perform it breaks out.