3v4l.org

run code in 300+ PHP versions simultaneously
<?php ini_set('display_errors', 1); error_reporting(E_ALL); $time = microtime(); $time = explode(' ', $time); $time = $time[1] + $time[0]; $start = $time; if (isset($_POST['request'])) { define("DB_HOST","mysql117.loopia.se"); define("DB_USER","normal@i103189"); define("DB_PASS","KungMicke87"); define("DB_NAME","indiehjaerta_com"); // 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(); } $email = mysqli_real_escape_string($sqli, $_POST['email']); $timestamp = date('Y-m-d H:i:s'); $token = sha1(uniqid($email, true)); $url = "http://www.indiehjaerta.com/getpassword.php?token=$token"; //$message = "Press think link $url to reset your password.\n\n If you didn't request a password change please discard this e-mail."; $message = "This function is currently not working :("; $headers = 'From: [indiehjaerta.com] Admin <no-reply@indiehjaerta.com>' . "\r\n"; mail($email, "[indiehjaerta.com] Password Reset", $message, $headers); $ip = ip2long($_SERVER['REMOTE_ADDR']); $query = mysqli_query($sqli,"INSERT INTO passwordrequest (`ipaddress`, `email`, `timestamp`, `token`) VALUES ('$ip', '$email', '$timestamp', '$token')"); } ?> <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /> <title>indiehjaerta.com - Request Password</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/> <br /> <br /> <?php if (isset($_POST['request'])) { ?> <table width="300" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC"> <tr> <td> <table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF"> <tr> <td colspan="3"><strong>E-mail sent to <?php echo $email ?> with details on how to change password.</strong></td> </tr> </table> </td> </tr> </table> <?php } else { ?> <table width="300" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC"> <tr> <form method="post" action=""> <td> <table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF"> <tr> <td colspan="3"><strong>Password request.</strong></td> </tr> <tr> <td width="78"><strong>E-mail</strong></td> <td width="6">:</td> <td width="294"><input name="email" type="text" id="email"></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td><input type="submit" name="request" value="Request"></td> </tr> </table> </td> </form> </tr> </table> <?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.10.0090.00916.56
7.4.00.0070.01316.64
7.3.130.0060.01316.66
7.3.120.0030.01716.70
7.3.110.0100.00716.45
7.3.100.0060.00316.45
7.3.90.0070.01016.48
7.3.80.0130.00316.32
7.3.70.0040.00416.46
7.3.60.0080.00816.48
7.3.50.0060.00316.38
7.3.40.0120.00316.38
7.3.30.0030.01016.41
7.3.20.0070.00718.11
7.3.10.0070.00917.43
7.3.00.0060.00617.54
7.2.260.0120.00316.79
7.2.250.0090.01216.52
7.2.240.0040.01116.73
7.2.230.0070.01016.77
7.2.220.0030.00616.65
7.2.210.0060.00616.78
7.2.200.0070.01116.86
7.2.190.0030.01016.86
7.2.180.0040.01116.74
7.2.170.0060.01216.63
7.2.160.0080.00616.70
7.2.150.0060.00918.69
7.2.140.0060.01018.51
7.2.130.0090.00817.73
7.2.120.0000.01517.76
7.2.110.0010.00917.66
7.2.100.0120.00317.71
7.2.90.0060.01017.73
7.2.80.0060.00617.71
7.2.70.0070.00717.84
7.2.60.0050.00917.68
7.2.50.0050.00717.56
7.2.40.0060.00717.49
7.2.30.0030.01117.78
7.2.20.0070.00417.77
7.2.10.0070.00717.59
7.2.00.0020.01317.86
7.1.330.0140.00017.37
7.1.320.0000.01017.24
7.1.310.0110.00317.46
7.1.300.0040.00817.53
7.1.290.0070.01017.46
7.1.280.0030.00617.63
7.1.270.0100.00317.42
7.1.260.0090.00617.38
7.1.250.0090.00516.58
7.1.240.0060.00317.30
7.1.230.0140.00017.29
7.1.220.0070.00417.27
7.1.210.0030.00817.27
7.1.200.0060.01017.42
7.1.190.0000.01017.37
7.1.180.0110.00417.21
7.1.170.0110.00417.31
7.1.160.0000.01417.46
7.1.150.0080.00317.31
7.1.140.0120.00317.44
7.1.130.0100.00317.38
7.1.120.0060.00617.21
7.1.110.0060.00617.47
7.1.100.0040.00417.41
7.1.90.0060.00917.50
7.1.80.0070.01017.38
7.1.70.0060.00617.24
7.1.60.0050.01118.43
7.1.50.0050.01117.20
7.1.40.0000.00917.55
7.1.30.0030.01217.41
7.1.20.0000.01817.34
7.1.10.0070.01017.34
7.1.00.0020.04419.77
7.0.330.0100.00616.90
7.0.320.0060.00617.09
7.0.310.0000.01416.90
7.0.300.0060.01017.03
7.0.290.0100.00617.03
7.0.280.0120.00317.02
7.0.270.0050.00517.00
7.0.260.0070.00717.07
7.0.250.0000.01017.18
7.0.240.0030.00916.93
7.0.230.0060.00917.04
7.0.220.0140.00416.89
7.0.210.0000.01717.04
7.0.200.0170.00915.96
7.0.190.0060.00916.98
7.0.180.0120.00317.07
7.0.170.0060.00916.81
7.0.160.0060.00616.82
7.0.150.0030.00517.00
7.0.140.0100.03619.46
7.0.130.0040.00816.98
7.0.120.0030.00917.18
7.0.110.0030.00817.14
7.0.100.0040.00417.08
7.0.90.0170.04418.46
7.0.80.0350.04118.47
7.0.70.0230.02618.56
7.0.60.0070.04118.48
7.0.50.0040.02618.67
7.0.40.0130.04017.55
7.0.30.0070.04717.54
7.0.20.0080.02317.55
7.0.10.0020.03017.56
7.0.00.0050.03517.58
5.6.400.0060.00616.00
5.6.390.0040.01116.33
5.6.380.0030.00715.82
5.6.370.0030.00715.90
5.6.360.0100.00315.96
5.6.350.0030.00916.00
5.6.340.0060.00615.77
5.6.330.0060.00616.05
5.6.320.0060.00316.15
5.6.310.0110.00615.96
5.6.300.0030.01216.30
5.6.290.0090.00015.89
5.6.280.0110.03518.60
5.6.270.0050.00516.23
5.6.260.0070.00716.01
5.6.250.0070.00716.05
5.6.240.0100.04018.42
5.6.230.0050.04418.30
5.6.220.0120.04118.22
5.6.210.0090.04018.46
5.6.200.0000.03218.52
5.6.190.0070.04918.50
5.6.180.0080.03718.56
5.6.170.0030.04118.71
5.6.160.0080.02618.73
5.6.150.0020.03118.65
5.6.140.0070.04018.48
5.6.130.0060.04718.42
5.6.120.0090.04518.47
5.6.110.0100.04218.43
5.6.100.0100.03718.41
5.6.90.0020.04718.53
5.6.80.0040.04918.15
5.6.70.0040.03518.12
5.6.60.0050.04018.26
5.6.50.0100.04318.23
5.6.40.0070.03218.10
5.6.30.0080.04318.09
5.6.20.0070.04118.18
5.6.10.0100.04018.21
5.6.00.0110.03418.21
5.5.380.0060.04318.22
5.5.370.0050.02818.15
5.5.360.0030.04418.05
5.5.350.0080.03718.26
5.5.340.0070.04018.46
5.5.330.0030.04718.37
5.5.320.0070.04018.38
5.5.310.0030.02518.36
5.5.300.0070.04318.23
5.5.290.0090.03518.37
5.5.280.0070.03018.42
5.5.270.0050.05118.24
5.5.260.0050.04518.48
5.5.250.0000.03218.31
5.5.240.0090.02817.95
5.5.230.0070.04517.93
5.5.220.0070.03318.01
5.5.210.0020.04017.94
5.5.200.0120.03917.87
5.5.190.0040.03918.07
5.5.180.0120.03818.09
5.5.170.0030.01315.57
5.5.160.0100.04018.20
5.5.150.0050.04118.17
5.5.140.0160.02918.03
5.5.130.0070.02818.03
5.5.120.0130.02717.90
5.5.110.0050.02418.07
5.5.100.0060.02317.96
5.5.90.0090.02917.98
5.5.80.0050.02317.96
5.5.70.0070.02617.97
5.5.60.0070.02317.98
5.5.50.0050.02318.00
5.5.40.0050.02717.86
5.5.30.0040.02417.92
5.5.20.0080.03518.03
5.5.10.0140.02217.94
5.5.00.0070.03217.96
5.4.450.0080.02416.08
5.4.440.0020.02816.02
5.4.430.0080.04316.05
5.4.420.0070.04416.07
5.4.410.0110.03315.91
5.4.400.0110.03515.91
5.4.390.0080.02315.85
5.4.380.0100.03515.79
5.4.370.0070.03716.08
5.4.360.0130.03515.81
5.4.350.0030.04615.93
5.4.340.0090.03915.68
5.4.330.0070.00312.69
5.4.320.0020.03516.09
5.4.310.0030.04316.01
5.4.300.0100.04015.85
5.4.290.0070.04015.71
5.4.280.0180.02815.95
5.4.270.0020.02715.99
5.4.260.0080.01815.95
5.4.250.0050.02715.80
5.4.240.0050.02315.72
5.4.230.0070.02215.95
5.4.220.0040.02415.97
5.4.210.0040.02415.83
5.4.200.0050.02315.88
5.4.190.0000.02415.81
5.4.180.0030.02315.82
5.4.170.0090.02015.84
5.4.160.0100.01815.78
5.4.150.0060.01815.75
5.4.140.0050.01914.45
5.4.130.0030.02514.45
5.4.120.0090.02214.46
5.4.110.0030.02214.55
5.4.100.0060.03114.54
5.4.90.0020.02714.65
5.4.80.0050.02114.61
5.4.70.0090.01514.55
5.4.60.0000.02614.39
5.4.50.0020.02314.53
5.4.40.0000.02314.62
5.4.30.0050.03114.49
5.4.20.0050.02114.56
5.4.10.0040.02414.48
5.4.00.0030.02514.19
5.3.290.0090.04313.91
5.3.280.0060.01913.75
5.3.270.0040.02413.81
5.3.260.0040.02313.86
5.3.250.0060.01813.80
5.3.240.0030.02313.76
5.3.230.0020.03013.90
5.3.220.0020.02313.80
5.3.210.0080.01813.67
5.3.200.0030.02313.81
5.3.190.0080.01813.73
5.3.180.0030.02513.85
5.3.170.0020.02713.81
5.3.160.0050.02213.88
5.3.150.0120.01513.82
5.3.140.0020.03013.80
5.3.130.0050.02213.81
5.3.120.0030.02413.81
5.3.110.0030.02813.89
5.3.100.0020.02513.51
5.3.90.0030.02313.53
5.3.80.0100.02013.48
5.3.70.0070.01913.42
5.3.60.0070.03613.61
5.3.50.0020.02413.50
5.3.40.0050.02513.50
5.3.30.0000.02213.41
5.3.20.0050.01813.26
5.3.10.0030.02013.16
5.3.00.0080.02613.05
5.2.170.0000.05311.40
5.2.160.0030.06311.40
5.2.150.0070.03011.40
5.2.140.0000.03711.40
5.2.130.0030.06711.40
5.2.120.0030.03011.40
5.2.110.0070.06311.40
5.2.100.0000.03311.40
5.2.90.0030.04011.40
5.2.80.0100.04011.40
5.2.70.0100.05711.40
5.2.60.0130.04011.40
5.2.50.0030.06311.40
5.2.40.0070.05311.40
5.2.30.0030.06311.40
5.2.20.0200.05011.40
5.2.10.0070.06011.40
5.2.00.0000.03011.40
5.1.60.0070.05011.40
5.1.50.0070.04011.40
5.1.40.0030.05011.40
5.1.30.0070.06011.40
5.1.20.0000.05011.40
5.1.10.0000.06011.40
5.1.00.0030.05711.40
5.0.50.0070.04011.40
5.0.40.0030.04711.40
5.0.30.0030.06011.40
5.0.20.0030.04011.40
5.0.10.0070.03711.40
5.0.00.0070.05311.40
4.4.90.0000.03311.40
4.4.80.0070.02711.40
4.4.70.0100.02311.40
4.4.60.0030.03311.40
4.4.50.0030.02711.40
4.4.40.0000.03711.40
4.4.30.0030.03711.40
4.4.20.0000.03711.40
4.4.10.0070.02711.40
4.4.00.0030.03711.40
4.3.110.0030.03711.40
4.3.100.0030.03311.40
4.3.90.0030.03311.40
4.3.80.0070.05011.40
4.3.70.0000.02311.40
4.3.60.0030.01711.40
4.3.50.0000.03311.40
4.3.40.0070.05011.40
4.3.30.0000.04011.40
4.3.20.0000.03711.40
4.3.10.0100.02711.40
4.3.00.0000.04011.40

preferences:
41.11 ms | 401 KiB | 5 Q