Home » PHP » PHP Switch Statement » Question
  1. What will be the output of the following PHP code ?
    <?php
    $n = 128;
    switch($n)
    {
    case "n":
    print "Welcome to";
    break;
    case 128:
    print "Interview";
    break;
    default:
    print "Mania";
    }
    ?>
    1. Mania
    2. Error
    3. Interview
    4. Welcome to
    5. None of these
Correct Option: C

Downcasting does not happen in case,it compares only with its data type.



Your comments will be displayed only after manual approval.