3v4l.org

run code in 300+ PHP versions simultaneously
<?php ini_set('display_errors', 'On'); error_reporting(E_ALL); $time = microtime(); $time = explode(' ', $time); $time = $time[1] + $time[0]; $start = $time; 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 - News</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 /> <!-- New Post 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 news ORDER BY id") or die("Error: ".mysqli_error($sqli)); echo '<table border="0">'; while ($row = mysqli_fetch_array($query)) { echo '<tr>'; echo '<td><span class="text">Subject:</span></td>'; echo '<td><span class="text"> .$row['headline']. </span></td>'; echo '</tr>'; echo '<tr>'; echo '<td colspan="2"><span class="text">Story:</span></td>'; echo '</tr>'; echo '<tr>'; echo '<td colspan="2"><span class="text">' .$row['story']. '</span></td>'; echo '</tr>'; echo '<tr>'; echo '<td><span class="text">Written by:</span></td>'; echo '<td><span class="text"> .$row['userid']. </span></td>'; echo '</tr>'; echo '<tr>'; echo '<td><span class="text">Time:</span></td>'; echo '<td><span class="text"> .$row['timestamp']. </span></td>'; echo '</tr>'; } echo "</table><br />"; ?> <!-- New Post 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>

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
5.4.280.0050.04012.38
5.4.270.0070.04012.38
5.4.260.0110.04812.38
5.4.250.0070.05512.38
5.4.240.0090.08112.38
5.4.230.0070.05212.37
5.4.220.0070.05512.37
5.4.210.0100.05112.37
5.4.200.0120.06012.37
5.4.190.0100.05712.36
5.4.180.0110.03812.37
5.4.170.0070.04112.37
5.4.160.0100.03912.37
5.4.150.0100.04212.37
5.4.140.0080.03812.05
5.4.130.0130.04312.04
5.4.120.0120.03612.01
5.4.110.0240.04312.00
5.4.100.0070.04512.00
5.4.90.0080.04512.00
5.4.80.0090.06112.00
5.4.70.0120.07111.99
5.4.60.0100.05911.99
5.4.50.0090.04712.00
5.4.40.0150.04611.98
5.4.30.0140.05611.98
5.4.20.0180.04811.98
5.4.10.0160.06311.98
5.4.00.0040.05111.47
5.3.280.0160.08812.71
5.3.270.0100.04112.73
5.3.260.0140.03612.72
5.3.250.0100.05912.72
5.3.240.0080.06012.72
5.3.230.0120.05512.71
5.3.220.0100.06212.68
5.3.210.0220.07612.68
5.3.200.0090.05412.68
5.3.190.0100.05812.68
5.3.180.0080.07512.67
5.3.170.0050.04612.67
5.3.160.0080.04112.67
5.3.150.0120.06012.68
5.3.140.0070.04012.66
5.3.130.0150.05212.66
5.3.120.0090.04812.66
5.3.110.0050.04612.66
5.3.100.0090.04112.12
5.3.90.0130.04412.08
5.3.80.0120.05212.07
5.3.70.0170.05212.07
5.3.60.0170.05912.07
5.3.50.0150.05012.00
5.3.40.0240.10512.00
5.3.30.0140.05411.94
5.3.20.0170.08011.71
5.3.10.0230.06211.68
5.3.00.0100.05511.67

preferences:
145.05 ms | 1394 KiB | 7 Q