3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $favcolor="blue"; switch ($favcolor) { case "red": echo "Your favorite color is red!"; case "blue": echo "Your favorite color is blue!"; case "green": echo "Your favorite color is green!"; default: echo "Your favorite color is neither red, blue, or green!"; } ?>
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Your favorite color is blue!Your favorite color is green!Your favorite color is neither red, blue, or green!