3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php switch ($date) { case ($date >= 1 && $date <= 5): $switchDate = "35"; break; case ($date >= 5 && $date <= 10): $switchDate = "40"; break; case ($date >= 10 && $date <= 15): $switchDate = "45"; break; case ($date >= 15 && $date <= 20): $switchDate = "50"; break; case ($date >= 20 && $date <= 25): $switchDate = "55"; break; case ($date >= 25 && $date <= 30): $switchDate = "00"; break; case ($date >= 30 && $date <= 35): $switchDate = "05"; break; case ($date >= 35 && $date <= 40): $switchDate = "10"; break; case ($date >= 40 && $date <= 45): $switchDate = "15"; break; case ($date >= 45 && $date <= 50): $switchDate = "20"; break; case ($date >= 50 && $date <= 55): $switchDate = "25"; break; case ($date >= 55 && $date <= 59): $switchDate = "30"; break; default: $switchDate = "00"; } echo $switchDate;
Output for 5.5.0 - 7.1.0
Notice: Undefined variable: date in /in/NVdlI on line 3 Notice: Undefined variable: date in /in/NVdlI on line 3 35
Output for 4.3.0 - 5.4.45
35