3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $to = 'vladlex007@gmail.com'; $subject = 'this came from your mother'; $name = $_POST['name']; $email = $_POST['email']; $topic= $_POST['topic']; $message = $_POST['message']; $body = <<<EMAIL Hi! My name is $name and my topic is: $topic $message Frome $name Oh beach my email: $email EMAIL; $header = "From: $email"; if($_POST){ if($name == '' || $email == '' || $message == ''){ $feedback = 'fill out fealds'; }else{ mail($to, $subject, $body, $header); $feedback = 'thancks'; } } ?> <!doctype html> <html lang="ru"> <head> <meta charset='utf-8' /> <style type='text/css'> form { width: 400px; } form ul { list-style-type: none; } form ul li { margin: 15px 0; } form label { bisplay: block; font-size: 11pt; } form input, testarea, select { font-size: 11pt; paddong: 5px; border: #ccc 3px solid; width: 100%; } </style> </head> <p id="feedback"><?php echo $feedback; ?> <form action="?" method="post"> <ul> <li> <label for="name">Name:</label> <input type="text" name="name" id="name" /> </li> <li> <label for="email">Email:</label> <input type="text" name="email" id="email" /> </li> <li> <label for="topic">Topic:</label> <select id="topic" name="topic"> <option value="Ponies">Ponies</option> <option value="Mexicans">Mexicans</option> <option value="Weiner">Weiner</option> </select> </li> <li> <label for="message">message:</label> <textarea id="message" name="message" cols="42" rows="9"></textarea> </li> <li><input type="submit" value="Submit"><li> </ul> </form> </html>
Output for 5.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Notice: Undefined index: name in /in/K0M95 on line 6 Notice: Undefined index: email in /in/K0M95 on line 7 Notice: Undefined index: topic in /in/K0M95 on line 8 Notice: Undefined index: message in /in/K0M95 on line 9 <!doctype html> <html lang="ru"> <head> <meta charset='utf-8' /> <style type='text/css'> form { width: 400px; } form ul { list-style-type: none; } form ul li { margin: 15px 0; } form label { bisplay: block; font-size: 11pt; } form input, testarea, select { font-size: 11pt; paddong: 5px; border: #ccc 3px solid; width: 100%; } </style> </head> <p id="feedback"> Notice: Undefined variable: feedback in /in/K0M95 on line 47 <form action="?" method="post"> <ul> <li> <label for="name">Name:</label> <input type="text" name="name" id="name" /> </li> <li> <label for="email">Email:</label> <input type="text" name="email" id="email" /> </li> <li> <label for="topic">Topic:</label> <select id="topic" name="topic"> <option value="Ponies">Ponies</option> <option value="Mexicans">Mexicans</option> <option value="Weiner">Weiner</option> </select> </li> <li> <label for="message">message:</label> <textarea id="message" name="message" cols="42" rows="9"></textarea> </li> <li><input type="submit" value="Submit"><li> </ul> </form> </html>
Output for 5.0.4 - 5.1.1, 5.1.3 - 5.2.17
Notice: Undefined index: name in /in/K0M95 on line 6 Notice: Undefined index: email in /in/K0M95 on line 7 Notice: Undefined index: topic in /in/K0M95 on line 8 Notice: Undefined index: message in /in/K0M95 on line 9 <!doctype html> <html lang="ru"> <head> <meta charset='utf-8' /> <style type='text/css'> form { width: 400px; } form ul { list-style-type: none; } form ul li { margin: 15px 0; } form label { bisplay: block; font-size: 11pt; } form input, testarea, select { font-size: 11pt; paddong: 5px; border: #ccc 3px solid; width: 100%; } </style> </head> <p id="feedback"> Notice: Undefined variable: feedback in /in/K0M95 on line 47 <form action="?" method="post"> <ul> <li> <label for="name">Name:</label> <input type="text" name="name" id="name" /> </li> <li> <label for="email">Email:</label> <input type="text" name="email" id="email" /> </li> <li> <label for="topic">Topic:</label> <select id="topic" name="topic"> <option value="Ponies">Ponies</option> <option value="Mexicans">Mexicans</option> <option value="Weiner">Weiner</option> </select> </li> <li> <label for="message">message:</label> <textarea id="message" name="message" cols="42" rows="9"></textarea> </li> <li><input type="submit" value="Submit"><li> </ul> </form> </html>
Output for 5.1.2
Notice: Undefined index: name in /in/K0M95 on line 6 Notice: Undefined index: email in /in/K0M95 on line 7 Notice: Undefined index: topic in /in/K0M95 on line 8 Notice: Undefined index: message in /in/K0M95 on line 9 <!doctype html> <html lang="ru"> <head> <meta charset='utf-8' /> <style type='text/css'> form { width: 400px; } form ul { list-style-type: none; } form ul li { margin: 15px 0; } form label { bisplay: block; font-size: 11pt; } form input, testarea, select { font-size: 11pt; paddong: 5px; border: #ccc 3px solid; width: 100%; } </style> </head> <p id="feedback"> Notice: Undefined variable: feedback in /in/K0M95 on line 48 <form action="?" method="post"> <ul> <li> <label for="name">Name:</label> <input type="text" name="name" id="name" /> </li> <li> <label for="email">Email:</label> <input type="text" name="email" id="email" /> </li> <li> <label for="topic">Topic:</label> <select id="topic" name="topic"> <option value="Ponies">Ponies</option> <option value="Mexicans">Mexicans</option> <option value="Weiner">Weiner</option> </select> </li> <li> <label for="message">message:</label> <textarea id="message" name="message" cols="42" rows="9"></textarea> </li> <li><input type="submit" value="Submit"><li> </ul> </form> </html>
Output for 4.3.0 - 4.4.1, 4.4.3 - 5.0.3
Notice: Undefined index: name in /in/K0M95 on line 6 Notice: Undefined index: email in /in/K0M95 on line 7 Notice: Undefined index: topic in /in/K0M95 on line 8 Notice: Undefined index: message in /in/K0M95 on line 9 <!doctype html> <html lang="ru"> <head> <meta charset='utf-8' /> <style type='text/css'> form { width: 400px; } form ul { list-style-type: none; } form ul li { margin: 15px 0; } form label { bisplay: block; font-size: 11pt; } form input, testarea, select { font-size: 11pt; paddong: 5px; border: #ccc 3px solid; width: 100%; } </style> </head> <p id="feedback"> Notice: Undefined variable: feedback in /in/K0M95 on line 47 <form action="?" method="post"> <ul> <li> <label for="name">Name:</label> <input type="text" name="name" id="name" /> </li> <li> <label for="email">Email:</label> <input type="text" name="email" id="email" /> </li> <li> <label for="topic">Topic:</label> <select id="topic" name="topic"> <option value="Ponies">Ponies</option> <option value="Mexicans">Mexicans</option> <option value="Weiner">Weiner</option> </select> </li> <li> <label for="message">message:</label> <textarea id="message" name="message" cols="42" rows="9"></textarea> </li> <li><input type="submit" value="Submit"><li> </ul> </form> </html>
Output for 4.4.2
Notice: Undefined index: name in /in/K0M95 on line 6 Notice: Undefined index: email in /in/K0M95 on line 7 Notice: Undefined index: topic in /in/K0M95 on line 8 Notice: Undefined index: message in /in/K0M95 on line 9 <!doctype html> <html lang="ru"> <head> <meta charset='utf-8' /> <style type='text/css'> form { width: 400px; } form ul { list-style-type: none; } form ul li { margin: 15px 0; } form label { bisplay: block; font-size: 11pt; } form input, testarea, select { font-size: 11pt; paddong: 5px; border: #ccc 3px solid; width: 100%; } </style> </head> <p id="feedback"> Notice: Undefined variable: feedback in /in/K0M95 on line 48 <form action="?" method="post"> <ul> <li> <label for="name">Name:</label> <input type="text" name="name" id="name" /> </li> <li> <label for="email">Email:</label> <input type="text" name="email" id="email" /> </li> <li> <label for="topic">Topic:</label> <select id="topic" name="topic"> <option value="Ponies">Ponies</option> <option value="Mexicans">Mexicans</option> <option value="Weiner">Weiner</option> </select> </li> <li> <label for="message">message:</label> <textarea id="message" name="message" cols="42" rows="9"></textarea> </li> <li><input type="submit" value="Submit"><li> </ul> </form> </html>