3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<!DOCTYPE HTML> <html> <head> <?php if(isset($_POST['colors'])) { $style = $_POST['colors']; } else { $style = "white"; } ?> <style> body { background-color:<?php echo $style;?> } #submit { } </style> </head> <body> <form action="Background.php" method="post"> <select name="colors"> <option value="Red" >Red</option> <option value="Blue" >Blue</option> <option value="Green" >Green</option> <option value="Yellow" >Yellow</option> <!--<option value="Purple">Purple</option> <option value="Pink">Pink</option> <option value="Wheat">Wheat</option> <option value="AliceBlue">Alice Blue</option> <option value="AquaMarine">Aqua Marine</option> <option value="Black">Black</option> <option value="Silver">Silver</option> <option value="Gray">Gray</option>--> </select> <input type="submit" value="Submit" id="submit"> </form> </body> </html>
Output for 4.3.0 - 7.2.0
<!DOCTYPE HTML> <html> <head> <style> body { background-color:white} #submit { } </style> </head> <body> <form action="Background.php" method="post"> <select name="colors"> <option value="Red" >Red</option> <option value="Blue" >Blue</option> <option value="Green" >Green</option> <option value="Yellow" >Yellow</option> <!--<option value="Purple">Purple</option> <option value="Pink">Pink</option> <option value="Wheat">Wheat</option> <option value="AliceBlue">Alice Blue</option> <option value="AquaMarine">Aqua Marine</option> <option value="Black">Black</option> <option value="Silver">Silver</option> <option value="Gray">Gray</option>--> </select> <input type="submit" value="Submit" id="submit"> </form> </body> </html>