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.0130.01016.63
8.3.50.0100.01122.05
8.3.40.0090.00618.72
8.3.30.0080.00619.05
8.3.20.0080.00020.33
8.3.10.0040.00423.54
8.3.00.0040.00420.85
8.2.180.0180.00316.50
8.2.170.0080.00822.96
8.2.160.0070.00720.44
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0030.00520.76
8.2.110.0060.00322.14
8.2.100.0060.00617.72
8.2.90.0000.00819.17
8.2.80.0080.00017.97
8.2.70.0030.00517.50
8.2.60.0030.00517.93
8.2.50.0060.00318.07
8.2.40.0040.00421.09
8.2.30.0050.00318.37
8.2.20.0050.00217.68
8.2.10.0060.00317.98
8.2.00.0040.00417.63
8.1.280.0040.01125.92
8.1.270.0000.00823.79
8.1.260.0090.00026.35
8.1.250.0050.00328.09
8.1.240.0070.00322.14
8.1.230.0000.01119.05
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0050.00517.10
8.1.190.0000.00817.25
8.1.180.0040.00418.10
8.1.170.0000.00918.50
8.1.160.0040.00421.94
8.1.150.0000.00718.61
8.1.140.0000.00717.43
8.1.130.0000.00717.71
8.1.120.0000.00717.43
8.1.110.0000.00817.34
8.1.100.0040.00417.36
8.1.90.0040.00417.35
8.1.80.0000.00717.34
8.1.70.0000.00817.37
8.1.60.0090.00017.45
8.1.50.0000.00817.47
8.1.40.0050.00517.40
8.1.30.0060.00317.49
8.1.20.0000.00917.63
8.1.10.0080.00017.42
8.1.00.0060.00317.47
8.0.300.0060.00318.77
8.0.290.0080.00017.18
8.0.280.0000.00818.35
8.0.270.0090.00017.18
8.0.260.0000.00617.25
8.0.250.0030.00316.86
8.0.240.0040.00416.98
8.0.230.0030.00316.95
8.0.220.0030.00516.81
8.0.210.0000.00716.82
8.0.200.0030.00316.94
8.0.190.0060.00316.83
8.0.180.0070.00016.81
8.0.170.0040.00416.96
8.0.160.0000.00716.76
8.0.150.0040.00416.78
8.0.140.0070.00016.74
8.0.130.0030.00313.29
8.0.120.0070.00016.80
8.0.110.0000.00716.87
8.0.100.0050.00316.94
8.0.90.0000.00716.71
8.0.80.0060.00916.86
8.0.70.0040.00416.88
8.0.60.0000.00716.76
8.0.50.0040.00416.75
8.0.30.0150.00417.34
8.0.20.0120.01017.40
8.0.10.0040.00416.92
8.0.00.0090.00916.74
7.4.330.0030.00315.00
7.4.320.0000.00716.62
7.4.300.0030.00616.52
7.4.290.0080.00016.57
7.4.280.0070.00416.59
7.4.270.0000.00716.51
7.4.260.0080.00216.37
7.4.250.0070.00016.36
7.4.240.0040.00316.56
7.4.230.0070.00016.57
7.4.220.0000.01716.61
7.4.210.0080.00616.65
7.4.200.0030.00316.42
7.4.190.0080.00016.54
7.4.160.0070.01016.58
7.4.150.0030.01617.40
7.4.140.0100.00817.86
7.4.130.0130.00616.40
7.4.120.0110.00916.69
7.4.110.0100.00716.56
7.4.100.0150.00816.54
7.4.90.0070.01016.61
7.4.80.0040.01819.39
7.4.70.0060.01216.34
7.4.60.0150.00616.39
7.4.50.0040.00416.36
7.4.40.0150.00316.46
7.4.30.0060.00916.70
7.4.00.0120.00314.98
7.3.330.0050.00212.97
7.3.320.0060.00013.03
7.3.310.0000.00716.30
7.3.300.0030.00516.25
7.3.290.0140.00516.21
7.3.280.0080.01016.25
7.3.270.0100.00717.40
7.3.260.0180.00616.27
7.3.250.0140.00716.29
7.3.240.0140.00316.49
7.3.230.0100.00716.48
7.3.210.0170.00016.33
7.3.200.0130.00719.39
7.3.190.0080.01116.19
7.3.180.0150.00016.53
7.3.170.0030.01416.40
7.3.160.0090.00616.59
7.3.120.0040.01114.91
7.3.10.0110.00816.41
7.3.00.0050.00816.37
7.2.330.0100.00716.28
7.2.320.0070.01016.77
7.2.310.0110.00816.79
7.2.300.0110.01016.77
7.2.290.0090.01216.79
7.2.130.0060.01116.72
7.2.120.0080.00816.58
7.2.110.0080.00816.49
7.2.100.0140.00216.58
7.2.90.0070.00916.74
7.2.80.0070.00616.58
7.2.70.0080.00916.62
7.2.60.0110.00716.75
7.2.50.0070.01216.47
7.2.40.0050.00816.56
7.2.30.0070.01116.75
7.2.20.0090.00416.58
7.2.10.0080.00816.71
7.2.00.0090.00617.44
7.1.250.0130.00515.45
7.1.200.0060.00915.72
7.1.100.0060.00917.98
7.1.70.0030.00517.14
7.1.60.0040.02119.46
7.1.50.0060.01616.86
7.1.00.0070.07322.51
7.0.200.0080.00416.66
7.0.140.0030.07321.96
7.0.100.0200.06720.04
7.0.90.0070.04720.17
7.0.80.0030.08720.02
7.0.70.0030.09020.07
7.0.60.0130.05019.93
7.0.50.0370.07320.34
7.0.40.0100.07320.19
7.0.30.0100.08020.13
7.0.20.0100.04720.08
7.0.10.0070.08320.14
7.0.00.0130.07720.14
5.6.280.0000.07720.93
5.6.250.0070.08720.61
5.6.240.0170.07320.76
5.6.230.0070.08720.64
5.6.220.0070.05720.62
5.6.210.0130.05720.66
5.6.200.0100.04721.11
5.6.190.0170.06021.14
5.6.180.0030.08721.09
5.6.170.0070.05020.95
5.6.160.0200.03721.07
5.6.150.0100.08021.14
5.6.140.0030.04021.14
5.6.130.0070.07721.14
5.6.120.0100.07321.19
5.6.110.0100.08021.11
5.6.100.0030.05020.98
5.6.90.0070.05020.94
5.6.80.0070.06320.39
5.6.70.0030.07720.43
5.6.60.0000.04020.48
5.6.50.0030.07320.51
5.6.40.0030.08020.38
5.6.30.0070.08320.39
5.6.20.0100.07020.32
5.6.10.0130.06720.46
5.6.00.0100.07020.39
5.5.380.0100.07720.45
5.5.370.0000.04320.43
5.5.360.0070.07020.54
5.5.350.0130.07020.38
5.5.340.0170.07720.65
5.5.330.0070.07320.74
5.5.320.0070.05020.92
5.5.310.0130.07720.75
5.5.300.0030.05720.93
5.5.290.0070.07020.80
5.5.280.0100.05020.73
5.5.270.0100.04720.88
5.5.260.0100.06320.76
5.5.250.0000.09320.60
5.5.240.0030.08320.25
5.5.230.0000.08320.21
5.5.220.0030.04020.17
5.5.210.0000.08320.30
5.5.200.0070.07020.27
5.5.190.0030.05020.22
5.5.180.0070.08720.29
5.5.160.0070.07720.11
5.5.150.0100.07720.27
5.5.140.0100.04320.24
5.5.130.0030.08019.99
5.5.120.0100.07320.13
5.5.110.0070.08020.27
5.5.100.0030.08020.18
5.5.90.0200.05320.04
5.5.80.0070.08019.94
5.5.70.0000.08320.16
5.5.60.0030.08020.11
5.5.50.0070.09019.97
5.5.40.0100.06020.16
5.5.30.0100.05020.02
5.5.20.0130.06719.96
5.5.10.0130.07320.13
5.5.00.0070.08320.04
5.4.450.0100.07719.11
5.4.440.0100.07019.20
5.4.430.0130.06719.41
5.4.420.0130.06719.30
5.4.410.0130.03719.10
5.4.400.0070.04318.95
5.4.390.0000.04019.04
5.4.380.0030.07718.81
5.4.370.0030.07719.12
5.4.360.0030.07719.06
5.4.350.0100.07318.95
5.4.340.0170.06318.90
5.4.320.0030.08019.07
5.4.310.0070.06719.12
5.4.300.0170.04019.09
5.4.290.0030.08018.78
5.4.280.0070.08018.81
5.4.270.0070.07319.14
5.4.260.0000.05019.04
5.4.250.0100.07318.96
5.4.240.0000.05319.05
5.4.230.0070.04318.93
5.4.220.0100.07019.11
5.4.210.0070.07718.93
5.4.200.0070.04019.08
5.4.190.0000.07019.04
5.4.180.0000.08319.21
5.4.170.0170.07319.13
5.4.160.0100.07019.05
5.4.150.0100.07318.94
5.4.140.0070.08016.26
5.4.130.0030.07716.13
5.4.120.0070.06716.26
5.4.110.0030.05316.31
5.4.100.0030.07716.43
5.4.90.0070.07316.32
5.4.80.0070.07716.21
5.4.70.0100.07016.31
5.4.60.0030.07316.38
5.4.50.0030.08316.23
5.4.40.0070.03716.44
5.4.30.0070.07316.41
5.4.20.0130.07016.23
5.4.10.0030.08316.19
5.4.00.0130.06015.79
5.3.290.0100.06014.66
5.3.280.0170.03314.57
5.3.270.0170.05714.48
5.3.260.0030.06014.48
5.3.250.0170.07014.55
5.3.240.0000.08314.63
5.3.230.0030.06714.43
5.3.220.0130.07014.42
5.3.210.0100.04314.59
5.3.200.0070.08014.44
5.3.190.0070.05314.49
5.3.180.0130.07314.55
5.3.170.0170.06314.54
5.3.160.0100.06014.43
5.3.150.0070.06314.59
5.3.140.0000.04014.43
5.3.130.0070.05714.51
5.3.120.0070.07314.39
5.3.110.0100.07314.39
5.3.100.0070.07314.04
5.3.90.0070.06314.03
5.3.80.0030.04713.94
5.3.70.0030.07713.98
5.3.60.0070.07714.00
5.3.50.0100.07013.87
5.3.40.0070.07013.92
5.3.30.0000.06013.83
5.3.20.0100.07313.70
5.3.10.0100.06713.50
5.3.00.0170.05313.59
5.2.170.0070.06011.16
5.2.160.0030.05011.01
5.2.150.0030.06011.03
5.2.140.0000.04011.20
5.2.130.0070.05711.14
5.2.120.0100.05311.00
5.2.110.0130.05011.11
5.2.100.0100.04311.12
5.2.90.0030.06311.21
5.2.80.0000.06011.13
5.2.70.0000.05711.11
5.2.60.0100.06011.09
5.2.50.0030.03710.83
5.2.40.0030.04710.87
5.2.30.0030.05011.00
5.2.20.0170.05010.84
5.2.10.0100.03310.91
5.2.00.0070.05710.77
5.1.60.0030.05710.00
5.1.50.0070.05310.07
5.1.40.0000.0509.98
5.1.30.0030.05310.36
5.1.20.0070.06010.41
5.1.10.0100.0379.92
5.1.00.0070.05710.17
5.0.50.0100.0408.62
5.0.40.0070.0438.50
5.0.30.0000.0508.33
5.0.20.0030.0278.33
5.0.10.0000.0478.33
5.0.00.0030.0678.33
4.4.90.0100.0308.22
4.4.80.0030.0338.22
4.4.70.0000.0378.22
4.4.60.0000.0208.22
4.4.50.0000.0238.22
4.4.40.0030.0438.22
4.4.30.0030.0308.23
4.4.20.0000.0238.29
4.4.10.0030.0378.33
4.4.00.0000.0508.33
4.3.110.0000.0408.33
4.3.100.0000.0338.33
4.3.90.0030.0308.33
4.3.80.0000.0578.33
4.3.70.0070.0238.33
4.3.60.0000.0378.33
4.3.50.0030.0378.33
4.3.40.0030.0378.33
4.3.30.0000.0208.33
4.3.20.0000.0408.33
4.3.10.0070.0278.33
4.3.00.0070.0308.33

preferences:
72.36 ms | 400 KiB | 5 Q