3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<html> <body> <?php if(isset($_POST['send'])){ if(empty($_POST['email']) || empty($_POST['subject']) || empty($_POST['text'])){ echo "all fields must be filled"; } else{ mail("yourmail@x.com", $_POST['subject'], $_POST['text']); echo "mail has been send"; } } ?><form method='post'><input type='text' name='email' placeholder='Email'><br> <input type='text' name='subject' placeholder='Subject'><br> <textarea rows="15" style="width:60%" name="text"> </textarea><br> <input type='submit' name='send' value='Send'></form> </body> </html>
Output for 4.3.0 - 7.1.0
<html> <body> <form method='post'><input type='text' name='email' placeholder='Email'><br> <input type='text' name='subject' placeholder='Subject'><br> <textarea rows="15" style="width:60%" name="text"> </textarea><br> <input type='submit' name='send' value='Send'></form> </body> </html>