3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $client_name = $_GET['client_name']; ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <title>My form</title> </head> <body> <form method='get'> <label>name: </label> <input type='text' name='client_name' /> <button type='submit'>Submit</button> </form> <p> <?php $client_name ? print $client_name : print 'Please Enter Name'; ?> </p> </body> </html>
Output for 5.3.0 - 7.1.0
Notice: Undefined index: client_name in /in/YS7g6 on line 2 <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <title>My form</title> </head> <body> <form method='get'> <label>name: </label> <input type='text' name='client_name' /> <button type='submit'>Submit</button> </form> <p> Please Enter Name </p> </body> </html>
Output for 4.3.0 - 5.2.17
Notice: Undefined index: client_name in /in/YS7g6 on line 2 <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <title>My form</title> </head> <body> <form method='get'> <label>name: </label> <input type='text' name='client_name' /> <button type='submit'>Submit</button> </form> <p> Please Enter Name </p> </body> </html>