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)
7.4.00.0060.00914.94
7.3.120.0040.01414.84
7.3.110.0070.01015.07
7.3.100.0070.01014.84
7.3.90.0120.00614.96
7.3.80.0030.01315.27
7.3.70.0090.00614.90
7.3.60.0070.00715.01
7.3.50.0110.00414.90
7.3.40.0100.00314.93
7.3.30.0030.01014.90
7.3.20.0080.00516.75
7.3.10.0040.00816.48
7.3.00.0050.00616.68
7.2.250.0030.01515.27
7.2.240.0100.01015.25
7.2.230.0140.00315.32
7.2.220.0070.01115.22
7.2.210.0070.00714.70
7.2.200.0040.01115.26
7.2.190.0060.00915.04
7.2.180.0050.00515.04
7.2.170.0040.01515.00
7.2.130.0060.00816.78
7.2.120.0040.00916.86
7.2.110.0020.01116.79
7.2.100.0060.00616.90
7.2.90.0040.00816.87
7.2.80.0080.00616.77
7.2.70.0100.00416.56
7.2.60.0050.01116.83
7.2.50.0070.00616.98
7.2.40.0040.00716.85
7.2.30.0040.00616.83
7.2.20.0090.00416.82
7.2.10.0040.00816.89
7.2.00.0050.00617.53
7.1.330.0040.00815.76
7.1.320.0070.01015.86
7.1.310.0080.01115.64
7.1.300.0000.01315.71
7.1.290.0060.00615.57
7.1.280.0060.00915.93
7.1.270.0060.00915.79
7.1.260.0030.01415.46
7.1.250.0060.00715.81
7.1.240.0000.01015.54
7.1.230.0100.00315.69
7.1.220.0090.00615.86
7.1.210.0100.00315.52
7.1.200.0100.00015.71
7.1.190.0040.01015.56
7.1.180.0090.00015.89
7.1.170.0040.01115.72
7.1.160.0060.00615.76
7.1.150.0000.01515.78
7.1.140.0060.00915.91
7.1.130.0030.00915.59
7.1.120.0000.01115.61
7.1.110.0030.01015.88
7.1.100.0030.01015.66
7.1.90.0090.00615.67
7.1.80.0000.00915.75
7.1.70.0000.01116.48
7.1.60.0080.01017.58
7.1.50.0050.00716.23
7.1.40.0070.00716.00
7.1.30.0030.01115.60
7.1.20.0070.01015.79
7.1.10.0100.00315.57
7.1.00.0030.03819.11
7.0.330.0080.00015.14
7.0.320.0030.00615.24
7.0.310.0100.00315.32
7.0.300.0030.01015.16
7.0.290.0030.01015.27
7.0.280.0060.00615.55
7.0.270.0060.00615.30
7.0.260.0000.01115.48
7.0.250.0040.00915.51
7.0.240.0030.01015.41
7.0.230.0060.00915.29
7.0.220.0120.00315.38
7.0.210.0060.00315.29
7.0.200.0230.00614.95
7.0.190.0100.00315.45
7.0.180.0030.00615.51
7.0.170.0040.00415.58
7.0.160.0000.01515.43
7.0.150.0070.00315.49
7.0.140.0070.03718.60
7.0.130.0000.01115.61
7.0.120.0030.01015.23
7.0.110.0070.00715.52
7.0.100.0060.00315.48
7.0.90.0040.01115.39
7.0.80.0000.01315.15
7.0.70.0080.00815.65
7.0.60.0080.04017.66
7.0.50.0060.02516.73
7.0.40.0030.04416.87
7.0.30.0230.02316.81
7.0.20.0190.04116.74
7.0.10.0030.03916.79
7.0.00.0010.05116.76
5.6.380.0100.00414.67
5.6.370.0030.00614.48
5.6.360.0060.01014.29
5.6.350.0000.01314.29
5.6.340.0070.00714.21
5.6.330.0060.00614.58
5.6.320.0040.01114.49
5.6.310.0030.01014.32
5.6.300.0040.00814.29
5.6.290.0060.01014.35
5.6.280.0070.04017.74
5.6.270.0070.00714.55
5.6.260.0000.01114.26
5.6.250.0060.01014.45
5.6.240.0070.00714.32
5.6.230.0070.01014.17
5.6.220.0040.01114.22
5.6.210.0050.03317.30
5.6.200.0030.03816.32
5.6.190.0130.03817.33
5.6.180.0110.02517.42
5.6.170.0170.04217.40
5.6.160.0030.04517.46
5.6.150.0070.04416.23
5.6.140.0030.02516.15
5.6.130.0050.03316.19
5.6.120.0030.02717.77
5.6.110.0040.02417.70
5.6.100.0070.04217.78
5.6.90.0070.03317.66
5.6.80.0100.02517.23
5.6.70.1320.02217.35
5.6.60.0040.01114.41
5.6.50.0080.00314.07
5.6.40.0030.01014.27
5.6.30.0030.00614.25
5.6.20.0070.00314.29
5.6.10.0040.01114.22
5.6.00.0100.00714.29
5.5.380.0060.00311.13
5.5.370.0070.00010.98
5.5.360.0030.00710.95
5.5.350.0070.04015.73
5.5.340.0050.04814.51
5.5.330.0070.02215.59
5.5.320.0100.02515.57
5.5.310.0120.02715.66
5.5.300.0020.02714.63
5.5.290.0070.02014.56
5.5.280.0010.02815.98
5.5.270.0070.04615.97
5.5.260.0060.04515.97
5.5.250.0070.03815.78
5.5.240.0080.02515.70
5.5.230.0040.00710.68
5.5.220.0030.00310.94
5.5.210.0070.00411.02
5.5.200.0060.00011.03
5.5.190.0000.01410.98
5.5.180.0000.01111.14
5.5.170.0000.00710.92
5.5.160.0060.00310.63
5.5.150.0060.00611.06
5.5.140.0060.00610.86
5.5.130.0030.00810.99
5.5.120.0040.00810.77
5.5.110.0060.00610.61
5.5.100.0030.00310.81
5.5.90.0060.00611.24
5.5.80.0000.01010.92
5.5.70.0060.00611.08
5.5.60.0100.00310.99
5.5.50.0060.00611.08
5.5.40.0030.00711.16
5.5.30.0000.01110.96
5.5.20.0030.01011.09
5.5.10.0000.01210.72
5.5.00.0030.00910.89
5.4.450.0080.03115.13
5.4.440.0070.03314.91
5.4.430.0100.04115.14
5.4.420.0070.04315.18
5.4.410.0090.02715.26
5.4.400.0080.03115.03
5.4.390.0070.03015.06
5.4.380.0150.03514.83
5.4.370.0250.03514.81
5.4.360.0230.03314.82
5.4.350.0130.03314.85
5.4.340.0230.04314.89
5.4.330.0000.01110.99
5.4.320.0030.02711.75
5.4.310.0030.02211.75
5.4.300.0020.02411.73
5.4.290.0060.02611.72
5.4.280.0120.04011.71
5.4.270.0090.03311.53
5.4.260.0050.03011.66
5.4.250.0060.02411.73
5.4.240.0090.02311.70
5.4.230.0070.03511.54
5.4.220.0080.02511.79
5.4.210.0080.02511.61
5.4.200.0070.03111.70
5.4.190.0070.04811.55
5.4.180.0090.03011.72
5.4.170.0040.03911.68
5.4.160.0070.02711.52
5.4.150.0160.04611.66
5.4.140.0110.04011.51
5.4.130.0140.03811.55
5.4.120.0100.03711.54
5.4.110.0090.04411.45
5.4.100.0110.04311.44
5.4.90.0070.03911.51
5.4.80.0070.03911.53
5.4.70.0110.04411.38
5.4.60.0090.04111.47
5.4.50.0100.03511.44
5.4.40.0090.04111.50
5.4.30.0040.03011.50
5.4.20.0080.04511.38
5.4.10.0080.02911.52
5.4.00.0040.02911.32
5.3.290.0050.02211.60
5.3.280.0080.02811.60
5.3.270.0110.03111.62
5.3.260.0090.03511.63
5.3.250.0120.02311.61
5.3.240.0090.01911.54
5.3.230.0310.04111.52
5.3.220.0120.04911.55
5.3.210.0040.03311.54
5.3.200.0080.03011.57
5.3.190.0040.03111.59
5.3.180.0080.02211.63
5.3.170.0070.02211.53
5.3.160.0060.03411.67
5.3.150.0080.06411.67
5.3.140.0110.02711.59
5.3.130.0060.03611.46
5.3.120.0080.02411.58
5.3.110.0090.03511.55
5.3.100.0070.02811.25
5.3.90.0040.02411.18
5.3.80.0120.02111.19
5.3.70.0070.02311.24
5.3.60.0080.02311.19
5.3.50.0040.02511.27
5.3.40.0050.02411.16
5.3.30.0060.02411.20
5.3.20.0040.02811.02
5.3.10.0070.02810.95
5.3.00.0070.02410.90
5.2.170.0050.0199.55
5.2.160.0030.0189.55
5.2.150.0050.0229.55
5.2.140.0040.0219.55
5.2.130.0060.0189.54
5.2.120.0070.0189.53
5.2.110.0080.0159.54
5.2.100.0040.0199.54
5.2.90.0060.0229.53
5.2.80.0080.0219.53
5.2.70.0060.0179.53
5.2.60.0120.0269.51
5.2.50.0050.0389.49
5.2.40.0060.0219.48
5.2.30.0040.0199.47
5.2.20.0040.0189.46
5.2.10.0030.0229.43
5.2.00.0040.0219.37
5.1.60.0050.0209.01
5.1.50.0030.0229.01
5.1.40.0040.0239.00
5.1.30.0040.0299.17
5.1.20.0070.0249.19
5.1.10.0050.0169.05
5.1.00.0020.0239.05
5.0.50.0040.0158.29
5.0.40.0050.0178.21
5.0.30.0060.0278.12
5.0.20.0040.0208.12
5.0.10.0060.0138.11
5.0.00.0020.0238.11
4.4.90.0090.0147.35
4.4.80.0030.0177.34
4.4.70.0060.0167.34
4.4.60.0040.0117.34
4.4.50.0060.0277.35
4.4.40.0030.0227.32
4.4.30.0050.0227.34
4.4.20.0010.0157.38
4.4.10.0040.0307.39
4.4.00.0060.0187.34
4.3.110.0040.0137.30
4.3.100.0070.0337.29
4.3.90.0020.0157.28
4.3.80.0040.0207.26
4.3.70.0040.0177.28
4.3.60.0150.0337.28
4.3.50.0050.0147.28
4.3.40.0050.0187.23
4.3.30.0030.0156.63
4.3.20.0040.0156.62
4.3.10.0030.0146.60
4.3.00.0030.0128.42

preferences:
35.17 ms | 401 KiB | 5 Q