3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function t($nakrutka) { switch (true) { case ($nakrutka < 6): $color = 'red'; break; case ($nakrutka < 12): $color = 'yellow'; break; case ($nakrutka < 20): $color = 'white'; break; default: $color = 'green'; } return $color } echo t(3);
based on Ba0PU
Output for 7.0.0
Parse error: syntax error, unexpected '}', expecting ';' in /in/gsdVr on line 18
Process exited with code 255.
Output for 5.3.20 - 5.6.16
Parse error: syntax error, unexpected '}' in /in/gsdVr on line 18
Process exited with code 255.