3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php /* Zet dit stuk bovenaan je pagina Als je dit niet doet rekent de code de laadtijd van de pagina verkeerd! */ $microtime = microtime(); $delen = explode(" ", $microtime); $precies = $delen[0]; $seconden = date("U"); $bgtm = $precies + $seconden; ?> </head> <head><title>Kennemercollege Boeken</title></head> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> <!--[if IE]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]--> <meta name="keywords" content="" /> <meta name="description" content="" /> <link rel="stylesheet" href="style.css" type="text/css" media="screen, projection" /> </head> <body> <div id="wrapper"> <header id="header"> <center><IMG src="Naamloos5.png" height="75" width="500"></center> </header><!-- #header--> <section id="middle"> <div id="container"> <div id="content"> <strong>Welkom.</strong> <br><br><br> Op kennemercollege boeken kan je eenvoudig een boek toevoegen voor het vak Nederlands. </div><!-- #content--> </div><!-- #container--> <aside id="sideLeft"> <P STYLE="font-size: 12pt;"><h1>Home</h1> <p> <a href="http://www.kennemercollegeboeken.hostzi.com/">Voorpagina</a><br> <a href="https://kennemer.swp.nl" onclick="window.open('https://kennemer.swp.nl','Magister', 'width=1000,height=425,scrollbars=no,toolbar=no,location=no'); return false">Magister</a><br> <a href="https://webmail.kennemercollege.nl/owa/" onclick="window.open('https://webmail.kennemercollege.nl/owa/','Kennemercollege Mail', 'width=400,height=425,scrollbars=no,toolbar=no,location=no'); return false">Kennemer Mail</a> <br> <a href="http://roosters.kennemercollege.nl/bulrooster/roosterwijzigingen/" onclick="window.open('http://roosters.kennemercollege.nl/bulrooster/roosterwijzigingen/','Kennemercollege Mail', 'width=400,height=425,scrollbars=no,toolbar=no,location=no'); return false">Rooster</a></p> <P STYLE="font-size: 12pt;"><h1>Account</h1> <a href="http://kennemercollegeboeken.hostzi.com/login.php">Inloggen</a><br> <a href="http://kennemercollegeboeken.hostzi.com/register.php">Account aanmaken</a><br> <a href="http://kennemercollegeboeken.hostzi.com/upload/">Support</a><br></p> <a href="http://kennemercollegeboeken.hostzi.com/contact/contact.php">Contact</a><br></p> <p style="font-size: 12pt;"><h1>Spelletjes</h1> <a href="http://www.kennemercollegeboeken.hostzi.com/game1.php">Bounce Game</a> <br> <a href="http://www.kennemercollegeboeken.hostzi.com/game2.php">Reactie Spel</a> <br> <a href="http://www.kennemercollegeboeken.hostzi.com/game3.php">Raad het nummer</a><br> <a href="http://www.kennemercollegeboeken.hostzi.com/game4.php">Zoek de Spion</a> <br></p> </aside><!-- #sideLeft --> </section><!-- #middle--> </div><!-- #wrapper --> <footer id="footer"> © Kennemercollege Boeken 2013. Site made by <b>Frank Martens</b> </footer><!-- #footer --> </body> </html> <?php mysql_connect("mysql11.000webhost.com", "a4692586_news", "news123"); mysql_select_db("a4692586_news"); $insertennodig = mysql_query("SELECT datum FROM teller WHERE ip = '".$_SERVER['REMOTE_ADDR']."' AND datum = CURDATE() LIMIT 1")or die(mysql_error()); if(mysql_num_rows($insertennodig) < 1) { mysql_query("INSERT INTO teller (ip, datum) VALUES('".$_SERVER['REMOTE_ADDR']."', CURDATE())") or die(mysql_error()); } $qry = mysql_query(" SELECT ( SELECT COUNT(datum) FROM teller WHERE datum = CURDATE() ) AS bezoekersvandaag, ( SELECT COUNT(datum) FROM teller WHERE datum >= CURDATE( ) - INTERVAL 1 WEEK ) AS bezoekersdezeweek, ( SELECT COUNT(datum) FROM teller WHERE datum >= CURDATE( ) - INTERVAL 1 MONTH ) AS bezoekersdezemaand, ( SELECT COUNT(datum) FROM teller WHERE datum >= CURDATE() - INTERVAL 1 YEAR ) AS bezoekersditjaar ")or die(mysql_error()); /* if(mysql_num_rows($qry) < 1) { echo 'er waren nog geen visits, maar deze "error" ga je nooit zien, want jij bent al een bezoeker die toegevoegd zou moeten zijn^^'; } else { */ while($res = mysql_fetch_assoc($qry)) { #echo 'vandaag: '.$res['bezoekersvandaag']; #echo '<br />'; #echo 'deze week: '.$res['bezoekersdezeweek']; #echo '<br />'; #echo 'deze maand: '.$res['bezoekersdezemaand']; #echo '<br />'; #echo 'dit jaar: '.$res['bezoekersditjaar']; } //} ?> <?php /* Zet dit stukje onderaan je pagina Als je dit niet doet rekent de code de laadtijd van de pagina verkeerd! */ $micro_end = microtime(); $delen = explode(" ", $micro_end); $precies_end = $delen[0]; $seconden_end = date("U"); $edtm = $precies_end + $seconden_end; $difference = $edtm - $bgtm; $difference = round($difference,5); // afronden op 5 getallen achter de komma echo "<i>Laadtijd van de pagina: <b>".$difference."</b> sec.</i>"; /*verander hier de zin waar in staat wat de laadtijd van de pagina is. Met $difference roep je de laadtijd op. */ ?>
Output for 7.0.0 - 7.1.0
</head> <head><title>Kennemercollege Boeken</title></head> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> <!--[if IE]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]--> <meta name="keywords" content="" /> <meta name="description" content="" /> <link rel="stylesheet" href="style.css" type="text/css" media="screen, projection" /> </head> <body> <div id="wrapper"> <header id="header"> <center><IMG src="Naamloos5.png" height="75" width="500"></center> </header><!-- #header--> <section id="middle"> <div id="container"> <div id="content"> <strong>Welkom.</strong> <br><br><br> Op kennemercollege boeken kan je eenvoudig een boek toevoegen voor het vak Nederlands. </div><!-- #content--> </div><!-- #container--> <aside id="sideLeft"> <P STYLE="font-size: 12pt;"><h1>Home</h1> <p> <a href="http://www.kennemercollegeboeken.hostzi.com/">Voorpagina</a><br> <a href="https://kennemer.swp.nl" onclick="window.open('https://kennemer.swp.nl','Magister', 'width=1000,height=425,scrollbars=no,toolbar=no,location=no'); return false">Magister</a><br> <a href="https://webmail.kennemercollege.nl/owa/" onclick="window.open('https://webmail.kennemercollege.nl/owa/','Kennemercollege Mail', 'width=400,height=425,scrollbars=no,toolbar=no,location=no'); return false">Kennemer Mail</a> <br> <a href="http://roosters.kennemercollege.nl/bulrooster/roosterwijzigingen/" onclick="window.open('http://roosters.kennemercollege.nl/bulrooster/roosterwijzigingen/','Kennemercollege Mail', 'width=400,height=425,scrollbars=no,toolbar=no,location=no'); return false">Rooster</a></p> <P STYLE="font-size: 12pt;"><h1>Account</h1> <a href="http://kennemercollegeboeken.hostzi.com/login.php">Inloggen</a><br> <a href="http://kennemercollegeboeken.hostzi.com/register.php">Account aanmaken</a><br> <a href="http://kennemercollegeboeken.hostzi.com/upload/">Support</a><br></p> <a href="http://kennemercollegeboeken.hostzi.com/contact/contact.php">Contact</a><br></p> <p style="font-size: 12pt;"><h1>Spelletjes</h1> <a href="http://www.kennemercollegeboeken.hostzi.com/game1.php">Bounce Game</a> <br> <a href="http://www.kennemercollegeboeken.hostzi.com/game2.php">Reactie Spel</a> <br> <a href="http://www.kennemercollegeboeken.hostzi.com/game3.php">Raad het nummer</a><br> <a href="http://www.kennemercollegeboeken.hostzi.com/game4.php">Zoek de Spion</a> <br></p> </aside><!-- #sideLeft --> </section><!-- #middle--> </div><!-- #wrapper --> <footer id="footer"> © Kennemercollege Boeken 2013. Site made by <b>Frank Martens</b> </footer><!-- #footer --> </body> </html> Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /in/D8tbR:71 Stack trace: #0 {main} thrown in /in/D8tbR on line 71
Process exited with code 255.
Output for 5.0.0 - 5.6.28
</head> <head><title>Kennemercollege Boeken</title></head> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> <!--[if IE]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]--> <meta name="keywords" content="" /> <meta name="description" content="" /> <link rel="stylesheet" href="style.css" type="text/css" media="screen, projection" /> </head> <body> <div id="wrapper"> <header id="header"> <center><IMG src="Naamloos5.png" height="75" width="500"></center> </header><!-- #header--> <section id="middle"> <div id="container"> <div id="content"> <strong>Welkom.</strong> <br><br><br> Op kennemercollege boeken kan je eenvoudig een boek toevoegen voor het vak Nederlands. </div><!-- #content--> </div><!-- #container--> <aside id="sideLeft"> <P STYLE="font-size: 12pt;"><h1>Home</h1> <p> <a href="http://www.kennemercollegeboeken.hostzi.com/">Voorpagina</a><br> <a href="https://kennemer.swp.nl" onclick="window.open('https://kennemer.swp.nl','Magister', 'width=1000,height=425,scrollbars=no,toolbar=no,location=no'); return false">Magister</a><br> <a href="https://webmail.kennemercollege.nl/owa/" onclick="window.open('https://webmail.kennemercollege.nl/owa/','Kennemercollege Mail', 'width=400,height=425,scrollbars=no,toolbar=no,location=no'); return false">Kennemer Mail</a> <br> <a href="http://roosters.kennemercollege.nl/bulrooster/roosterwijzigingen/" onclick="window.open('http://roosters.kennemercollege.nl/bulrooster/roosterwijzigingen/','Kennemercollege Mail', 'width=400,height=425,scrollbars=no,toolbar=no,location=no'); return false">Rooster</a></p> <P STYLE="font-size: 12pt;"><h1>Account</h1> <a href="http://kennemercollegeboeken.hostzi.com/login.php">Inloggen</a><br> <a href="http://kennemercollegeboeken.hostzi.com/register.php">Account aanmaken</a><br> <a href="http://kennemercollegeboeken.hostzi.com/upload/">Support</a><br></p> <a href="http://kennemercollegeboeken.hostzi.com/contact/contact.php">Contact</a><br></p> <p style="font-size: 12pt;"><h1>Spelletjes</h1> <a href="http://www.kennemercollegeboeken.hostzi.com/game1.php">Bounce Game</a> <br> <a href="http://www.kennemercollegeboeken.hostzi.com/game2.php">Reactie Spel</a> <br> <a href="http://www.kennemercollegeboeken.hostzi.com/game3.php">Raad het nummer</a><br> <a href="http://www.kennemercollegeboeken.hostzi.com/game4.php">Zoek de Spion</a> <br></p> </aside><!-- #sideLeft --> </section><!-- #middle--> </div><!-- #wrapper --> <footer id="footer"> © Kennemercollege Boeken 2013. Site made by <b>Frank Martens</b> </footer><!-- #footer --> </body> </html> Fatal error: Call to undefined function mysql_connect() in /in/D8tbR on line 71
Process exited with code 255.
Output for 4.3.2 - 4.4.9
</head> <head><title>Kennemercollege Boeken</title></head> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> <!--[if IE]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]--> <meta name="keywords" content="" /> <meta name="description" content="" /> <link rel="stylesheet" href="style.css" type="text/css" media="screen, projection" /> </head> <body> <div id="wrapper"> <header id="header"> <center><IMG src="Naamloos5.png" height="75" width="500"></center> </header><!-- #header--> <section id="middle"> <div id="container"> <div id="content"> <strong>Welkom.</strong> <br><br><br> Op kennemercollege boeken kan je eenvoudig een boek toevoegen voor het vak Nederlands. </div><!-- #content--> </div><!-- #container--> <aside id="sideLeft"> <P STYLE="font-size: 12pt;"><h1>Home</h1> <p> <a href="http://www.kennemercollegeboeken.hostzi.com/">Voorpagina</a><br> <a href="https://kennemer.swp.nl" onclick="window.open('https://kennemer.swp.nl','Magister', 'width=1000,height=425,scrollbars=no,toolbar=no,location=no'); return false">Magister</a><br> <a href="https://webmail.kennemercollege.nl/owa/" onclick="window.open('https://webmail.kennemercollege.nl/owa/','Kennemercollege Mail', 'width=400,height=425,scrollbars=no,toolbar=no,location=no'); return false">Kennemer Mail</a> <br> <a href="http://roosters.kennemercollege.nl/bulrooster/roosterwijzigingen/" onclick="window.open('http://roosters.kennemercollege.nl/bulrooster/roosterwijzigingen/','Kennemercollege Mail', 'width=400,height=425,scrollbars=no,toolbar=no,location=no'); return false">Rooster</a></p> <P STYLE="font-size: 12pt;"><h1>Account</h1> <a href="http://kennemercollegeboeken.hostzi.com/login.php">Inloggen</a><br> <a href="http://kennemercollegeboeken.hostzi.com/register.php">Account aanmaken</a><br> <a href="http://kennemercollegeboeken.hostzi.com/upload/">Support</a><br></p> <a href="http://kennemercollegeboeken.hostzi.com/contact/contact.php">Contact</a><br></p> <p style="font-size: 12pt;"><h1>Spelletjes</h1> <a href="http://www.kennemercollegeboeken.hostzi.com/game1.php">Bounce Game</a> <br> <a href="http://www.kennemercollegeboeken.hostzi.com/game2.php">Reactie Spel</a> <br> <a href="http://www.kennemercollegeboeken.hostzi.com/game3.php">Raad het nummer</a><br> <a href="http://www.kennemercollegeboeken.hostzi.com/game4.php">Zoek de Spion</a> <br></p> </aside><!-- #sideLeft --> </section><!-- #middle--> </div><!-- #wrapper --> <footer id="footer"> © Kennemercollege Boeken 2013. Site made by <b>Frank Martens</b> </footer><!-- #footer --> </body> </html> Warning: mysql_connect(): Unknown MySQL Server Host 'mysql11.000webhost.com' (0) in /in/D8tbR on line 71 Warning: mysql_select_db(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /in/D8tbR on line 72 Warning: mysql_select_db(): A link to the server could not be established in /in/D8tbR on line 72 Notice: Undefined index: REMOTE_ADDR in /in/D8tbR on line 74 Warning: mysql_query(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /in/D8tbR on line 74 Warning: mysql_query(): A link to the server could not be established in /in/D8tbR on line 74 Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Output for 4.3.0 - 4.3.1
</head> <head><title>Kennemercollege Boeken</title></head> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> <!--[if IE]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]--> <meta name="keywords" content="" /> <meta name="description" content="" /> <link rel="stylesheet" href="style.css" type="text/css" media="screen, projection" /> </head> <body> <div id="wrapper"> <header id="header"> <center><IMG src="Naamloos5.png" height="75" width="500"></center> </header><!-- #header--> <section id="middle"> <div id="container"> <div id="content"> <strong>Welkom.</strong> <br><br><br> Op kennemercollege boeken kan je eenvoudig een boek toevoegen voor het vak Nederlands. </div><!-- #content--> </div><!-- #container--> <aside id="sideLeft"> <P STYLE="font-size: 12pt;"><h1>Home</h1> <p> <a href="http://www.kennemercollegeboeken.hostzi.com/">Voorpagina</a><br> <a href="https://kennemer.swp.nl" onclick="window.open('https://kennemer.swp.nl','Magister', 'width=1000,height=425,scrollbars=no,toolbar=no,location=no'); return false">Magister</a><br> <a href="https://webmail.kennemercollege.nl/owa/" onclick="window.open('https://webmail.kennemercollege.nl/owa/','Kennemercollege Mail', 'width=400,height=425,scrollbars=no,toolbar=no,location=no'); return false">Kennemer Mail</a> <br> <a href="http://roosters.kennemercollege.nl/bulrooster/roosterwijzigingen/" onclick="window.open('http://roosters.kennemercollege.nl/bulrooster/roosterwijzigingen/','Kennemercollege Mail', 'width=400,height=425,scrollbars=no,toolbar=no,location=no'); return false">Rooster</a></p> <P STYLE="font-size: 12pt;"><h1>Account</h1> <a href="http://kennemercollegeboeken.hostzi.com/login.php">Inloggen</a><br> <a href="http://kennemercollegeboeken.hostzi.com/register.php">Account aanmaken</a><br> <a href="http://kennemercollegeboeken.hostzi.com/upload/">Support</a><br></p> <a href="http://kennemercollegeboeken.hostzi.com/contact/contact.php">Contact</a><br></p> <p style="font-size: 12pt;"><h1>Spelletjes</h1> <a href="http://www.kennemercollegeboeken.hostzi.com/game1.php">Bounce Game</a> <br> <a href="http://www.kennemercollegeboeken.hostzi.com/game2.php">Reactie Spel</a> <br> <a href="http://www.kennemercollegeboeken.hostzi.com/game3.php">Raad het nummer</a><br> <a href="http://www.kennemercollegeboeken.hostzi.com/game4.php">Zoek de Spion</a> <br></p> </aside><!-- #sideLeft --> </section><!-- #middle--> </div><!-- #wrapper --> <footer id="footer"> © Kennemercollege Boeken 2013. Site made by <b>Frank Martens</b> </footer><!-- #footer --> </body> </html> Warning: mysql_connect() [http://www.php.net/function.mysql-connect]: Unknown MySQL Server Host 'mysql11.000webhost.com' (0) in /in/D8tbR on line 71 Warning: mysql_select_db() [http://www.php.net/function.mysql-select-db]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /in/D8tbR on line 72 Warning: mysql_select_db() [http://www.php.net/function.mysql-select-db]: A link to the server could not be established in /in/D8tbR on line 72 Notice: Undefined index: REMOTE_ADDR in /in/D8tbR on line 74 Warning: mysql_query() [http://www.php.net/function.mysql-query]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /in/D8tbR on line 74 Warning: mysql_query() [http://www.php.net/function.mysql-query]: A link to the server could not be established in /in/D8tbR on line 74 Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)