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)
5.4.290.0070.05712.49
5.4.280.0080.05312.39
5.4.270.0050.04912.39
5.4.260.0080.03812.39
5.4.250.0160.04312.39
5.4.240.0070.04012.39
5.4.230.0050.04012.38
5.4.220.0070.03712.38
5.4.210.0080.03412.38
5.4.200.0060.04212.38
5.4.190.0070.03712.38
5.4.180.0070.04012.38
5.4.170.0070.03612.38
5.4.160.0070.03612.38
5.4.150.0060.03712.38
5.4.140.0080.03612.07
5.4.130.0070.03712.05
5.4.120.0050.03712.01
5.4.110.0060.03612.01
5.4.100.0030.03812.01
5.4.90.0060.04612.01
5.4.80.0070.03812.01
5.4.70.0100.03212.01
5.4.60.0060.03712.00
5.4.50.0050.03712.00
5.4.40.0040.03812.00
5.4.30.0080.04312.00
5.4.20.0110.04511.99
5.4.10.0120.04911.99
5.4.00.0100.04511.48
5.3.280.0080.04912.71
5.3.270.0060.05412.72
5.3.260.0100.03812.72
5.3.250.0110.03212.72
5.3.240.0020.04412.72
5.3.230.0070.04312.71
5.3.220.0090.04012.68
5.3.210.0120.03712.68
5.3.200.0110.05212.68
5.3.190.0120.03912.68
5.3.180.0070.04012.68
5.3.170.0050.04012.67
5.3.160.0060.03912.68
5.3.150.0090.03712.67
5.3.140.0060.04012.66
5.3.130.0110.05212.66
5.3.120.0150.05412.66
5.3.110.0070.04312.66
5.3.100.0040.03912.12
5.3.90.0060.03712.09
5.3.80.0090.04912.07
5.3.70.0100.04512.07
5.3.60.0080.04312.06
5.3.50.0090.03512.00
5.3.40.0050.04512.00
5.3.30.0070.03911.96
5.3.20.0070.05011.74
5.3.10.0110.04711.71
5.3.00.0080.04811.70

preferences:
140.71 ms | 1386 KiB | 7 Q