3v4l.org

run code in 300+ PHP versions simultaneously
<!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 8.0.0 - 8.0.12, 8.0.14 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
<!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(): open_basedir restriction in effect. File(select.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/EBtoU on line 49 Warning: include(select.php): Failed to open stream: Operation not permitted 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 8.0.13
<!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 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.7, 7.3.32 - 7.3.33, 7.4.33
<!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 7.2.29 - 7.2.33, 7.3.16 - 7.3.31, 7.4.0 - 7.4.32
<!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(): open_basedir restriction in effect. File(select.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/EBtoU on line 49 Warning: include(select.php): failed to open stream: Operation not permitted 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 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 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>

preferences:
251.57 ms | 405 KiB | 351 Q