When should a switch/case statement be preferred over a series of if/else statements in PHP?

Switch/case statements should be preferred over a series of if/else statements in PHP when you have a series of conditions that depend on the value of a single variable. Switch/case statements are more readable and efficient in this scenario, as they provide a cleaner way to handle multiple conditions based on a single value.

// Example of using switch/case statement
$day = "Monday";

switch ($day) {
    case "Monday":
        echo "Today is Monday";
        break;
    case "Tuesday":
        echo "Today is Tuesday";
        break;
    default:
        echo "Today is not Monday or Tuesday";
}