3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<!DOCTYPE html> <html> <body> <?php $favcolor="red"; switch ($favcolor) { case "red": echo "Your favorite color is red!"; break; case "blue": echo "Your favorite color is blue!"; break; case "green": echo "Your favorite color is green!"; break; default: echo "Your favorite color is neither red, blue, or green!"; } ?> </body> </html>
Output for 4.3.0 - 7.2.0
<!DOCTYPE html> <html> <body> Your favorite color is red! </body> </html>