3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<? //In case you are wondering 'echo' is very similar to 'print' $salary = 100000; switch ($salary) { case ($salary < 25000): echo "You have no chance"; break; case ($salary < 50000): echo "Are you in shape?"; break; case ($salary <= 100000): echo "Gold dig it up!"; break; case ($salary < 250000): echo "Facebook or Twitter Stock Options?"; break; print 'default'; }
based on FvDMU
Output for 5.4.34 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
Gold dig it up!
Output for hhvm-3.10.0

Process exited with code 153.
Output for 4.3.0 - 5.4.32
<? //In case you are wondering 'echo' is very similar to 'print' $salary = 100000; switch ($salary) { case ($salary < 25000): echo "You have no chance"; break; case ($salary < 50000): echo "Are you in shape?"; break; case ($salary <= 100000): echo "Gold dig it up!"; break; case ($salary < 250000): echo "Facebook or Twitter Stock Options?"; break; print 'default'; }