3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php if($_POST['formSubmit'] == "Submit") { $varMovie = $_POST['formMovie']; $varName = $_POST['formName']; } ?> <form action="myform.php" method="post"> Which is your favorite movie? <input type="text" name="formMovie" maxlength="50" value="<?=$varMovie;?>"> What is your name? <input type="text" name="formName" maxlength="50" value="<?=$varName;?>"> <input type="submit" name="formSubmit" value="Submit"> </form>
Output for 5.4.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Notice: Undefined index: formSubmit in /in/l81LL on line 2 <form action="myform.php" method="post"> Which is your favorite movie? <input type="text" name="formMovie" maxlength="50" value=" Notice: Undefined variable: varMovie in /in/l81LL on line 10 "> What is your name? <input type="text" name="formName" maxlength="50" value=" Notice: Undefined variable: varName in /in/l81LL on line 13 "> <input type="submit" name="formSubmit" value="Submit"> </form>
Output for 5.3.0 - 5.3.29
Notice: Undefined index: formSubmit in /in/l81LL on line 2 <form action="myform.php" method="post"> Which is your favorite movie? <input type="text" name="formMovie" maxlength="50" value="<?=$varMovie;?>"> What is your name? <input type="text" name="formName" maxlength="50" value="<?=$varName;?>"> <input type="submit" name="formSubmit" value="Submit"> </form>
Output for 4.3.0 - 5.2.17
Notice: Undefined index: formSubmit in /in/l81LL on line 2 <form action="myform.php" method="post"> Which is your favorite movie? <input type="text" name="formMovie" maxlength="50" value="<?=$varMovie;?>"> What is your name? <input type="text" name="formName" maxlength="50" value="<?=$varName;?>"> <input type="submit" name="formSubmit" value="Submit"> </form>