3v4l.org

run code in 300+ PHP versions simultaneously
form.php <!DOCTYPE html> <html> <head> <title>Registration Form</title> </head> <body> <h2>User Registration</h2> <form method="POST" action="form.php"> Name: <input type="text" name="name"><br><br> Email: <input type="email" name="email"><br><br> Phone: <input type="text" name="phone"><br><br> <input type="submit" name="submit" value="Submit"> </form> <?php if(isset($_POST['submit'])) { $name = $_POST['name']; $email = $_POST['email']; $phone = $_POST['phone']; echo "<h3>Submitted Data</h3>"; echo "Name: ".$name."<br>"; echo "Email: ".$email."<br>"; echo "Phone: ".$phone; } ?> </body> </html>
Output for 8.3.0 - 8.3.30, 8.4.1 - 8.4.18, 8.5.0 - 8.5.3
form.php <!DOCTYPE html> <html> <head> <title>Registration Form</title> </head> <body> <h2>User Registration</h2> <form method="POST" action="form.php"> Name: <input type="text" name="name"><br><br> Email: <input type="email" name="email"><br><br> Phone: <input type="text" name="phone"><br><br> <input type="submit" name="submit" value="Submit"> </form> </body> </html>

preferences:
50.82 ms | 730 KiB | 4 Q