3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php ini_set('display_errors', 'On'); error_reporting(E_ALL); $time = microtime(); $time = explode(' ', $time); $time = $time[1] + $time[0]; $start = $time; session_start(); define("DB_HOST","mysql117.loopia.se"); define("DB_USER","normal@i103189"); define("DB_PASS","KungMicke87"); define("DB_NAME","indiehjaerta_com"); ?> <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /> <title>indiehjaerta.com - Members</title> <link href="style_test.css" rel="stylesheet" type="text/css" /> </head> <body> <a href="login.php">Login<a/> - <a href="admin.php">Admin<a/> - <a href="members.php">Members<a/> - <a href="register.php">Register<a/> - <a href="blog.php">Blog<a/> - <a href="news.php">News<a/> - <a href="event.php">Event<a/> - <a href="forum.php">Forum<a/> - <a href="profile.php">Profile<a/> - <a href="logout.php">Logout<a/> <br /> <br /> <!-- Member Edit Start --> <?php //if ($_GET['action'] == 'edit') if (FALSE) { ?> Edit User! <?php } else { ?> <!-- Member Edit End --> <!-- Member List Start --> <?php // Connect to MySQLi $sqli = mysqli_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME) or die("Error: ".mysqli_error($sqli)); // Check connection if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } $query = mysqli_query($sqli, "SELECT * FROM members ORDER BY id") or die("Error: ".mysqli_error($sqli)); echo "<table border='0'> <tr> <th>ID</th> <th>UserName</th> <th>EDIT</th> </tr>"; while ($row = mysqli_fetch_array($query)) { echo "<tr>"; echo "<td>" . $row['id'] . "</td>"; echo "<td>" . $row['username'] . "</td>"; //echo '<td><a href="members.php?action=edit"</td>'; echo "</tr>"; } echo "</table>"; } ?> <!-- Member List End --> <?php $time = microtime(); $time = explode(' ', $time); $time = $time[1] + $time[0]; $finish = $time; $total_time = round(($finish - $start), 4); echo '<span class="text">Page generated in '.$total_time.' seconds.</span><br />'; ?> </body> </html>
Output for 7.0.0 - 7.1.0
<html> <head> <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /> <title>indiehjaerta.com - Members</title> <link href="style_test.css" rel="stylesheet" type="text/css" /> </head> <body> <a href="login.php">Login<a/> - <a href="admin.php">Admin<a/> - <a href="members.php">Members<a/> - <a href="register.php">Register<a/> - <a href="blog.php">Blog<a/> - <a href="news.php">News<a/> - <a href="event.php">Event<a/> - <a href="forum.php">Forum<a/> - <a href="profile.php">Profile<a/> - <a href="logout.php">Logout<a/> <br /> <br /> <!-- Member Edit Start --> <!-- Member Edit End --> <!-- Member List Start --> Fatal error: Uncaught Error: Call to undefined function mysqli_connect() in /in/IF46e:65 Stack trace: #0 {main} thrown in /in/IF46e on line 65
Process exited with code 255.
Output for 5.3.29, 5.4.29 - 5.6.28
<html> <head> <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /> <title>indiehjaerta.com - Members</title> <link href="style_test.css" rel="stylesheet" type="text/css" /> </head> <body> <a href="login.php">Login<a/> - <a href="admin.php">Admin<a/> - <a href="members.php">Members<a/> - <a href="register.php">Register<a/> - <a href="blog.php">Blog<a/> - <a href="news.php">News<a/> - <a href="event.php">Event<a/> - <a href="forum.php">Forum<a/> - <a href="profile.php">Profile<a/> - <a href="logout.php">Logout<a/> <br /> <br /> <!-- Member Edit Start --> <!-- Member Edit End --> <!-- Member List Start --> Fatal error: Call to undefined function mysqli_connect() in /in/IF46e on line 65
Process exited with code 255.
Output for 5.0.0 - 5.3.28, 5.4.0 - 5.4.28
Warning: ini_set() has been disabled for security reasons in /in/IF46e on line 2 Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /in/IF46e:2) in /in/IF46e on line 10 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /in/IF46e:2) in /in/IF46e on line 10 <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /> <title>indiehjaerta.com - Members</title> <link href="style_test.css" rel="stylesheet" type="text/css" /> </head> <body> <a href="login.php">Login<a/> - <a href="admin.php">Admin<a/> - <a href="members.php">Members<a/> - <a href="register.php">Register<a/> - <a href="blog.php">Blog<a/> - <a href="news.php">News<a/> - <a href="event.php">Event<a/> - <a href="forum.php">Forum<a/> - <a href="profile.php">Profile<a/> - <a href="logout.php">Logout<a/> <br /> <br /> <!-- Member Edit Start --> <!-- Member Edit End --> <!-- Member List Start --> Fatal error: Call to undefined function mysqli_connect() in /in/IF46e on line 65
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Warning: ini_set() has been disabled for security reasons in /in/IF46e on line 2 Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /in/IF46e:2) in /in/IF46e on line 10 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /in/IF46e:2) in /in/IF46e on line 10 <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /> <title>indiehjaerta.com - Members</title> <link href="style_test.css" rel="stylesheet" type="text/css" /> </head> <body> <a href="login.php">Login<a/> - <a href="admin.php">Admin<a/> - <a href="members.php">Members<a/> - <a href="register.php">Register<a/> - <a href="blog.php">Blog<a/> - <a href="news.php">News<a/> - <a href="event.php">Event<a/> - <a href="forum.php">Forum<a/> - <a href="profile.php">Profile<a/> - <a href="logout.php">Logout<a/> <br /> <br /> <!-- Member Edit Start --> <!-- Member Edit End --> <!-- Member List Start --> Fatal error: Call to undefined function: mysqli_connect() in /in/IF46e on line 65
Process exited with code 255.
Output for 4.3.5 - 4.4.4
Warning: ini_set() has been disabled for security reasons in /in/IF46e on line 2 Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /in/IF46e:2) in /in/IF46e on line 10 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /in/IF46e:2) in /in/IF46e on line 10 <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /> <title>indiehjaerta.com - Members</title> <link href="style_test.css" rel="stylesheet" type="text/css" /> </head> <body> <a href="login.php">Login<a/> - <a href="admin.php">Admin<a/> - <a href="members.php">Members<a/> - <a href="register.php">Register<a/> - <a href="blog.php">Blog<a/> - <a href="news.php">News<a/> - <a href="event.php">Event<a/> - <a href="forum.php">Forum<a/> - <a href="profile.php">Profile<a/> - <a href="logout.php">Logout<a/> <br /> <br /> <!-- Member Edit Start --> <!-- Member Edit End --> <!-- Member List Start --> Fatal error: Call to undefined function: mysqli_connect() in /in/IF46e on line 65
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Warning: ini_set,pcntl_fork() has been disabled for security reasons in /in/IF46e on line 2 Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /in/IF46e:2) in /in/IF46e on line 10 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /in/IF46e:2) in /in/IF46e on line 10 <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /> <title>indiehjaerta.com - Members</title> <link href="style_test.css" rel="stylesheet" type="text/css" /> </head> <body> <a href="login.php">Login<a/> - <a href="admin.php">Admin<a/> - <a href="members.php">Members<a/> - <a href="register.php">Register<a/> - <a href="blog.php">Blog<a/> - <a href="news.php">News<a/> - <a href="event.php">Event<a/> - <a href="forum.php">Forum<a/> - <a href="profile.php">Profile<a/> - <a href="logout.php">Logout<a/> <br /> <br /> <!-- Member Edit Start --> <!-- Member Edit End --> <!-- Member List Start --> Fatal error: Call to undefined function: mysqli_connect() in /in/IF46e on line 65
Process exited with code 255.
Output for 4.3.1
Warning: ini_set,pcntl_fork() has been disabled for security reasons in /in/IF46e on line 2 Warning: session_start() [http://www.php.net/function.session-start]: Cannot send session cookie - headers already sent by (output started at /in/IF46e:2) in /in/IF46e on line 10 Warning: session_start() [http://www.php.net/function.session-start]: Cannot send session cache limiter - headers already sent (output started at /in/IF46e:2) in /in/IF46e on line 10 <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /> <title>indiehjaerta.com - Members</title> <link href="style_test.css" rel="stylesheet" type="text/css" /> </head> <body> <a href="login.php">Login<a/> - <a href="admin.php">Admin<a/> - <a href="members.php">Members<a/> - <a href="register.php">Register<a/> - <a href="blog.php">Blog<a/> - <a href="news.php">News<a/> - <a href="event.php">Event<a/> - <a href="forum.php">Forum<a/> - <a href="profile.php">Profile<a/> - <a href="logout.php">Logout<a/> <br /> <br /> <!-- Member Edit Start --> <!-- Member Edit End --> <!-- Member List Start --> Fatal error: Call to undefined function: mysqli_connect() in /in/IF46e on line 65
Output for 4.3.0
<html> <head> <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /> <title>indiehjaerta.com - Members</title> <link href="style_test.css" rel="stylesheet" type="text/css" /> </head> <body> <a href="login.php">Login<a/> - <a href="admin.php">Admin<a/> - <a href="members.php">Members<a/> - <a href="register.php">Register<a/> - <a href="blog.php">Blog<a/> - <a href="news.php">News<a/> - <a href="event.php">Event<a/> - <a href="forum.php">Forum<a/> - <a href="profile.php">Profile<a/> - <a href="logout.php">Logout<a/> <br /> <br /> <!-- Member Edit Start --> <!-- Member Edit End --> <!-- Member List Start -->