3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>The HTML5 Herald</title> <meta name="description" content="Website Homepage"> <meta name="author" content="Milos Djokic"> <link rel="stylesheet" href="css.css"> <script> function loadXMLDoc() { var xmlhttp; if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("ajaxdiv").innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","author.txt",true); xmlhttp.send(); } </script> </head> <body> <div id="ajaxdiv"> <h2>Let AJAX change this text</h2> </div> <button type="button" onclick="loadXMLDoc()">Show Author</button> <BR> <BR> Show Current Table - SELECT: <?php include 'select.php';?> <BR> <BR> INSERT: <form action="insert.php" method="post"> Firstname: <input type="text" name="firstname"> Lastname: <input type="text" name="lastname"> Age: <input type="text" name="age"> <input type="submit"> </form> <BR> <BR> UPDATE AGE: <form action="insert.php" method="post"> Firstname: <input type="text" name="firstname"> Lastname: <input type="text" name="lastname"> Age: <input type="text" name="age"> <input type="submit"> </form> <BR> <BR> DELETE USING FIRSTNAME AND LASTNAME: <form action="delete.php" method="post"> Firstname: <input type="text" name="firstname"> Lastname: <input type="text" name="lastname"> Age: <input type="text" name="age"> <input type="submit"> </form> <BR> <BR> <footer> <?php echo "<p>Copyright &copy; 1999-" . date("Y") . " Milos Djokic</p>"; ?> </footer> </body> </html>
Output for 5.1.0 - 7.1.0
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>The HTML5 Herald</title> <meta name="description" content="Website Homepage"> <meta name="author" content="Milos Djokic"> <link rel="stylesheet" href="css.css"> <script> function loadXMLDoc() { var xmlhttp; if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("ajaxdiv").innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","author.txt",true); xmlhttp.send(); } </script> </head> <body> <div id="ajaxdiv"> <h2>Let AJAX change this text</h2> </div> <button type="button" onclick="loadXMLDoc()">Show Author</button> <BR> <BR> Show Current Table - SELECT: Warning: include(select.php): failed to open stream: No such file or directory in /in/EBtoU on line 49 Warning: include(): Failed opening 'select.php' for inclusion (include_path='.:') in /in/EBtoU on line 49 <BR> <BR> INSERT: <form action="insert.php" method="post"> Firstname: <input type="text" name="firstname"> Lastname: <input type="text" name="lastname"> Age: <input type="text" name="age"> <input type="submit"> </form> <BR> <BR> UPDATE AGE: <form action="insert.php" method="post"> Firstname: <input type="text" name="firstname"> Lastname: <input type="text" name="lastname"> Age: <input type="text" name="age"> <input type="submit"> </form> <BR> <BR> DELETE USING FIRSTNAME AND LASTNAME: <form action="delete.php" method="post"> Firstname: <input type="text" name="firstname"> Lastname: <input type="text" name="lastname"> Age: <input type="text" name="age"> <input type="submit"> </form> <BR> <BR> <footer> <p>Copyright &copy; 1999-2014 Milos Djokic</p></footer> </body> </html>
Output for 4.3.2 - 5.0.5
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>The HTML5 Herald</title> <meta name="description" content="Website Homepage"> <meta name="author" content="Milos Djokic"> <link rel="stylesheet" href="css.css"> <script> function loadXMLDoc() { var xmlhttp; if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("ajaxdiv").innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","author.txt",true); xmlhttp.send(); } </script> </head> <body> <div id="ajaxdiv"> <h2>Let AJAX change this text</h2> </div> <button type="button" onclick="loadXMLDoc()">Show Author</button> <BR> <BR> Show Current Table - SELECT: Warning: main(select.php): failed to open stream: No such file or directory in /in/EBtoU on line 49 Warning: main(): Failed opening 'select.php' for inclusion (include_path='.:') in /in/EBtoU on line 49 <BR> <BR> INSERT: <form action="insert.php" method="post"> Firstname: <input type="text" name="firstname"> Lastname: <input type="text" name="lastname"> Age: <input type="text" name="age"> <input type="submit"> </form> <BR> <BR> UPDATE AGE: <form action="insert.php" method="post"> Firstname: <input type="text" name="firstname"> Lastname: <input type="text" name="lastname"> Age: <input type="text" name="age"> <input type="submit"> </form> <BR> <BR> DELETE USING FIRSTNAME AND LASTNAME: <form action="delete.php" method="post"> Firstname: <input type="text" name="firstname"> Lastname: <input type="text" name="lastname"> Age: <input type="text" name="age"> <input type="submit"> </form> <BR> <BR> <footer> <p>Copyright &copy; 1999-2014 Milos Djokic</p></footer> </body> </html>
Output for 4.3.0 - 4.3.1
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>The HTML5 Herald</title> <meta name="description" content="Website Homepage"> <meta name="author" content="Milos Djokic"> <link rel="stylesheet" href="css.css"> <script> function loadXMLDoc() { var xmlhttp; if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("ajaxdiv").innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","author.txt",true); xmlhttp.send(); } </script> </head> <body> <div id="ajaxdiv"> <h2>Let AJAX change this text</h2> </div> <button type="button" onclick="loadXMLDoc()">Show Author</button> <BR> <BR> Show Current Table - SELECT: Warning: main(select.php) [http://www.php.net/function.main]: failed to create stream: No such file or directory in /in/EBtoU on line 49 Warning: main() [http://www.php.net/function.main]: Failed opening 'select.php' for inclusion (include_path='.:') in /in/EBtoU on line 49 <BR> <BR> INSERT: <form action="insert.php" method="post"> Firstname: <input type="text" name="firstname"> Lastname: <input type="text" name="lastname"> Age: <input type="text" name="age"> <input type="submit"> </form> <BR> <BR> UPDATE AGE: <form action="insert.php" method="post"> Firstname: <input type="text" name="firstname"> Lastname: <input type="text" name="lastname"> Age: <input type="text" name="age"> <input type="submit"> </form> <BR> <BR> DELETE USING FIRSTNAME AND LASTNAME: <form action="delete.php" method="post"> Firstname: <input type="text" name="firstname"> Lastname: <input type="text" name="lastname"> Age: <input type="text" name="age"> <input type="submit"> </form> <BR> <BR> <footer> <p>Copyright &copy; 1999-2014 Milos Djokic</p></footer> </body> </html>