3v4l.org

run code in 300+ PHP versions simultaneously
<?php // http://sudobash.net/?p=736 session_start(); session_destroy(); if(!isset($_POST['user'])){ ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr"> <!-- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> --> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>LOGIN TITLE</title> </head> <body> <table align="center" height="200px" id="content"> <tr> <td valign="middle"> <h2>TITLE Login</h2> <form action="login.php" method="POST"> <tt>RAC Username:</tt> <input type="text" name="user" size="30" /><br /> <tt>RAC Password:</tt> <input type="password" name="password" size="30" /> <input type="submit" value="Login" name="submit" /> </form> </td> </tr> </table> </body> </html> <?php } ?> <?php if(isset($_POST['user'])){ ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr"> <!-- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> --> <head> <title>LOGIN RESULTS TITLE</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <?php include 'conf.php'; // Don't display the warnings - we are already setup to annoy the user ini_set( "display_errors", 0); // No funny stuff! $user = htmlspecialchars($_POST['user']); $user = explode(" ", $user); $user = $user[0]; $user = preg_replace("/[^a-zA-Z0-9_]/", "", $user); $filter = "admin=" . $user; // Connect to the LDAP server. $ldapconn = ldap_connect($server, $port) or die("Could not connect to " . $server . ":" . $port . "."); // Bind with rootreader to the LDAP server to search and retrieve DN. $ldapbind = ldap_bind($ldapconn) or die("Could not bind - contact admin@adamskalicky.com"); $result = ldap_search($ldapconn,$basedn,$filter) or die ("Search error."); $entries = ldap_get_entries($ldapconn, $result); $binddn = $entries[0]["dn"]; // Bind again using the DN retrieved. If this bind is successful, // then the user has managed to authenticate. $ldapbind = ldap_bind($ldapconn, $binddn, $_POST['password']); if ($ldapbind) { echo "<center><h2>Successful authentication for <span style='color: #000;'>" . $user . "</span></center>"; ?> <table align="center" height="200px" id="content"> <tr> <td valign="middle"> <form action="restricted.php" method="post"> <input type="hidden" name='user' value="<?=$user;?>" > <input type="submit" value="Great, Let's go!" > </form> </td> </tr> </table> <?php } else { echo "<center><h2>Failed authentication for <span style='color: #000;'>" . $user . "</span><br /><br /> <a href='login.php'>Try again</a></center>"; } ldap_close($ldapconn); ?> </body> </html> <?php } ?>

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)
8.3.60.0150.00716.75
8.3.50.0120.00821.97
8.3.40.0080.01218.79
8.3.30.0140.00419.09
8.3.20.0040.00420.16
8.3.10.0060.00323.66
8.3.00.0030.00619.38
8.2.180.0200.00316.63
8.2.170.0060.01222.96
8.2.160.0070.00720.57
8.2.150.0030.00624.18
8.2.140.0040.00424.66
8.2.130.0020.00526.16
8.2.120.0040.00422.21
8.2.110.0090.00022.21
8.2.100.0090.00617.72
8.2.90.0040.00419.05
8.2.80.0040.00417.97
8.2.70.0060.00317.50
8.2.60.0080.00017.80
8.2.50.0000.00918.07
8.2.40.0060.00319.79
8.2.30.0040.00418.29
8.2.20.0050.00317.70
8.2.10.0080.00018.13
8.2.00.0000.00917.74
8.1.280.0070.00725.92
8.1.270.0000.00723.82
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0030.00622.06
8.1.230.0050.00519.21
8.1.220.0040.00417.76
8.1.210.0000.00818.77
8.1.200.0000.00917.35
8.1.190.0000.00817.23
8.1.180.0070.00319.01
8.1.170.0030.00618.46
8.1.160.0040.00421.97
8.1.150.0070.00018.62
8.1.140.0040.00417.28
8.1.130.0000.00717.72
8.1.120.0070.00017.45
8.1.110.0080.00317.33
8.1.100.0000.00717.38
8.1.90.0000.00717.48
8.1.80.0030.00517.43
8.1.70.0000.00717.40
8.1.60.0030.00517.46
8.1.50.0000.00817.46
8.1.40.0030.00517.50
8.1.30.0000.00817.61
8.1.20.0030.00617.64
8.1.10.0000.00817.56
8.1.00.0040.00417.54
8.0.300.0000.00718.77
8.0.290.0080.00017.29
8.0.280.0040.00418.36
8.0.270.0070.00017.25
8.0.260.0070.00017.24
8.0.250.0030.00316.90
8.0.240.0000.00916.93
8.0.230.0080.00016.93
8.0.220.0040.00416.75
8.0.210.0040.00416.88
8.0.200.0030.00316.92
8.0.190.0040.00416.84
8.0.180.0040.00416.93
8.0.170.0040.00416.83
8.0.160.0070.00016.82
8.0.150.0060.00616.84
8.0.140.0080.00016.87
8.0.130.0040.00413.30
8.0.120.0000.00816.80
8.0.110.0000.00716.87
8.0.100.0040.00416.75
8.0.90.0040.00416.68
8.0.80.0060.01016.91
8.0.70.0000.00716.77
8.0.60.0000.00716.89
8.0.50.0000.00716.71
8.0.30.0160.00517.05
8.0.20.0070.01217.40
8.0.10.0000.00717.05
8.0.00.0090.00816.82
7.4.330.0000.00515.00
7.4.320.0030.00316.49
7.4.300.0000.00716.54
7.4.290.0090.00016.46
7.4.280.0000.00816.58
7.4.270.0030.00516.52
7.4.260.0000.00716.62
7.4.250.0050.00216.60
7.4.240.0050.00216.57
7.4.230.0030.00316.52
7.4.220.0060.01216.44
7.4.210.0050.01116.56
7.4.200.0040.00416.38
7.4.190.0070.00016.77
7.4.160.0100.00716.48
7.4.150.0080.01117.40
7.4.140.0140.00717.86
7.4.130.0100.00816.53
7.4.120.0070.01116.53
7.4.110.0030.01416.41
7.4.100.0140.00316.50
7.4.90.0080.00816.50
7.4.80.0140.01019.39
7.4.70.0050.01116.51
7.4.60.0030.01316.41
7.4.50.0000.00816.32
7.4.40.0130.00316.22
7.4.30.0030.01316.46
7.4.00.0060.00615.14
7.3.330.0030.00312.97
7.3.320.0000.00613.08
7.3.310.0030.00316.13
7.3.300.0040.00416.23
7.3.290.0040.01516.26
7.3.280.0080.01016.28
7.3.270.0200.00617.40
7.3.260.0060.01216.52
7.3.250.0110.01116.37
7.3.240.0110.00716.29
7.3.230.0070.01116.62
7.3.210.0090.00916.44
7.3.200.0100.01619.39
7.3.190.0100.01016.33
7.3.180.0120.00616.16
7.3.170.0170.00316.50
7.3.160.0130.00316.52
7.3.120.0040.01114.59
7.2.330.0110.00716.39
7.2.320.0030.01616.46
7.2.310.0110.00716.63
7.2.300.0090.00616.74
7.2.290.0120.00616.63
7.2.80.0080.00416.71
7.2.60.0040.00416.83
7.1.200.0000.00915.56
7.1.70.0030.00616.81
7.1.60.0100.01419.46
7.1.50.0130.01316.88
7.1.00.0030.07722.30
7.0.200.0050.00216.64
7.0.140.0100.06722.07
7.0.80.0530.04720.04
7.0.70.0530.06719.96
7.0.60.0470.04720.00
7.0.50.0570.05020.21
7.0.40.0030.05720.19
7.0.30.0100.07720.14
7.0.20.0000.05020.11
7.0.10.0070.05020.07
7.0.00.0100.08320.09
5.6.280.0070.07020.92
5.6.230.0070.08020.70
5.6.220.0100.07320.67
5.6.210.0300.06320.64
5.6.200.0030.08021.04
5.6.190.0200.07021.09
5.6.180.0000.06021.13
5.6.170.0100.06021.00
5.6.160.0100.08721.12
5.6.150.0130.07321.02
5.6.140.0070.06721.04
5.6.130.0070.06721.06
5.6.120.0130.07321.08
5.6.110.0100.08021.07
5.6.100.0030.04721.07
5.6.90.0070.05721.13
5.6.80.0130.07020.43
5.6.70.0070.04720.32
5.6.60.0100.05720.44
5.6.50.0130.08020.56
5.6.40.0130.06720.54
5.6.30.0000.06020.55
5.6.20.0000.08320.31
5.6.10.0000.05720.41
5.6.00.0030.04320.43
5.5.370.0070.05320.38
5.5.360.0130.08020.41
5.5.350.0100.07320.40
5.5.340.0070.07020.87
5.5.330.0070.05720.89
5.5.320.0100.07720.76
5.5.310.0070.04020.91
5.5.300.0030.08720.88
5.5.290.0100.04320.77
5.5.280.0070.07020.88
5.5.270.0070.05020.87
5.5.260.0100.07720.90
5.5.250.0030.08320.73
5.5.240.0100.04320.04
5.5.230.0100.07020.02
5.5.220.0130.07020.11
5.5.210.0070.08320.27
5.5.200.0070.04020.11
5.5.190.0100.07320.28
5.5.180.0100.06320.25
5.5.160.0070.08020.12
5.5.150.0130.07020.25
5.5.140.0070.08020.13
5.5.130.0070.07720.22
5.5.120.0070.08020.13
5.5.110.0030.07720.25
5.5.100.0130.07020.17
5.5.90.0100.05320.16
5.5.80.0170.04320.13
5.5.70.0130.04320.11
5.5.60.0100.04020.07
5.5.50.0100.07720.07
5.5.40.0030.07320.09
5.5.30.0030.05020.15
5.5.20.0130.07319.93
5.5.10.0100.05020.02
5.5.00.0070.07319.99
5.4.450.0070.08319.55
5.4.440.0030.09019.46
5.4.430.0100.03319.45
5.4.420.0070.05019.38
5.4.410.0100.07019.31
5.4.400.0100.05019.21
5.4.390.0070.07319.04
5.4.380.0100.04719.03
5.4.370.0070.05318.94
5.4.360.0130.06319.15
5.4.350.0030.08318.91
5.4.340.0000.08318.96
5.4.320.0070.08019.12
5.4.310.0100.06319.12
5.4.300.0030.05718.90
5.4.290.0170.06318.78
5.4.280.0100.07319.14
5.4.270.0200.06019.02
5.4.260.0100.04019.09
5.4.250.0130.06718.89
5.4.240.0030.08019.22
5.4.230.0030.05319.09
5.4.220.0100.04319.15
5.4.210.0000.06019.04
5.4.200.0130.06719.11
5.4.190.0070.07719.17
5.4.180.0070.05319.22
5.4.170.0030.07019.02
5.4.160.0070.07719.12
5.4.150.0070.07319.09
5.4.140.0030.07316.07
5.4.130.0000.07716.27
5.4.120.0070.07016.26
5.4.110.0170.04016.34
5.4.100.0100.06716.26
5.4.90.0070.07316.41
5.4.80.0070.07316.20
5.4.70.0100.06716.25
5.4.60.0100.06316.30
5.4.50.0000.07716.39
5.4.40.0030.04016.42
5.4.30.0070.06716.30
5.4.20.0100.05016.37
5.4.10.0130.06016.19
5.4.00.0100.07015.72
5.3.290.0100.07014.52
5.3.280.0030.08014.58
5.3.270.0030.08014.53
5.3.260.0100.04014.60
5.3.250.0070.04314.47
5.3.240.0030.07714.58
5.3.230.0030.04714.61
5.3.220.0030.08014.54
5.3.210.0000.05014.42
5.3.200.0030.07714.59
5.3.190.0200.03314.52
5.3.180.0000.07714.39
5.3.170.0000.07714.43
5.3.160.0030.06314.39
5.3.150.0100.07314.48
5.3.140.0130.06714.43
5.3.130.0030.08014.56
5.3.120.0000.06714.56
5.3.110.0070.05014.41
5.3.100.0070.07314.01
5.3.90.0200.06014.01
5.3.80.0070.05714.01
5.3.70.0100.07013.89
5.3.60.0130.07013.85
5.3.50.0100.06713.95
5.3.40.0070.07313.82
5.3.30.0070.07313.87
5.3.20.0030.04713.66
5.3.10.0100.06013.44
5.3.00.0100.06713.43
5.2.170.0070.06311.70
5.2.160.0030.06711.70
5.2.150.0070.06011.70
5.2.140.0030.06011.70
5.2.130.0130.05311.70
5.2.120.0070.03711.70
5.2.110.0000.04311.70
5.2.100.0000.04711.70
5.2.90.0030.06311.70
5.2.80.0070.06011.70
5.2.70.0100.05711.70
5.2.60.0030.06311.70
5.2.50.0030.06711.70
5.2.40.0030.06011.70
5.2.30.0030.04011.70
5.2.20.0070.06311.70
5.2.10.0030.06311.70
5.2.00.0070.05711.70
5.1.60.0070.03711.70
5.1.50.0070.04711.70
5.1.40.0070.04311.70
5.1.30.0030.03011.70
5.1.20.0030.03011.70
5.1.10.0100.05311.70
5.1.00.0030.05311.70
5.0.50.0070.04311.70
5.0.40.0070.04311.70
5.0.30.0000.06711.70
5.0.20.0030.03711.70
5.0.10.0030.03311.70
5.0.00.0070.06711.70
4.4.90.0030.03311.70
4.4.80.0000.03711.70
4.4.70.0000.04011.70
4.4.60.0030.03711.70
4.4.50.0000.04011.70
4.4.40.0070.03011.70
4.4.30.0000.02711.70
4.4.20.0130.02711.70
4.4.10.0030.03311.70
4.4.00.0000.04311.70
4.3.110.0000.03311.70
4.3.100.0100.02711.70
4.3.90.0000.01711.70
4.3.80.0030.05311.70
4.3.70.0000.02011.70
4.3.60.0070.03011.70
4.3.50.0030.03011.70
4.3.40.0030.05311.70
4.3.30.0030.02711.70
4.3.20.0000.03311.70
4.3.10.0000.03311.70
4.3.00.0000.03711.70

preferences:
37.9 ms | 401 KiB | 5 Q