3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php if(isset($_POST['submit'])) { $name = $_POST['name']; echo "User Has submitted the form and entered this name : <b> $name </b>"; echo "<br>You can use the following form again to enter a new name."; } ?> <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>"> <input type="text" name="name"><br> <input type="submit" name="submit" value="Submit Form"><br> </form>
Output for 5.2.3 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
<form method="post" action="/in/PaiMX"> <input type="text" name="name"><br> <input type="submit" name="submit" value="Submit Form"><br> </form>
Output for 4.3.0 - 5.2.2
<form method="post" action=""> <input type="text" name="name"><br> <input type="submit" name="submit" value="Submit Form"><br> </form>