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> <?}?> <?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> <? } 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> <?}?>

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.70.0140.00718.68
8.3.60.0100.00716.88
8.3.50.0090.00822.06
8.3.40.0110.00718.84
8.3.30.0040.01118.95
8.3.20.0040.00420.59
8.3.10.0040.00421.82
8.3.00.0060.00320.93
8.2.180.0000.01518.41
8.2.170.0060.01218.66
8.2.160.0100.01022.96
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0160.00326.16
8.2.120.0050.00222.32
8.2.110.0060.00322.07
8.2.100.0080.00417.78
8.2.90.0040.00419.14
8.2.80.0040.00418.04
8.2.70.0030.00617.50
8.2.60.0080.00017.93
8.2.50.0040.00418.07
8.2.40.0040.00417.91
8.2.30.0040.00417.79
8.2.20.0040.00417.58
8.2.10.0000.00717.65
8.2.00.0040.00417.61
8.1.280.0110.00425.92
8.1.270.0000.00823.80
8.1.260.0000.00826.35
8.1.250.0050.00228.09
8.1.240.0030.00623.86
8.1.230.0110.00019.21
8.1.220.0030.00617.74
8.1.210.0000.00818.77
8.1.200.0040.00417.13
8.1.190.0040.00417.38
8.1.180.0040.00418.10
8.1.170.0000.01118.56
8.1.160.0040.00422.02
8.1.150.0000.00718.57
8.1.140.0070.00017.24
8.1.130.0070.00017.68
8.1.120.0000.00717.39
8.1.110.0000.00817.32
8.1.100.0070.00017.36
8.1.90.0040.00417.30
8.1.80.0000.00717.34
8.1.70.0030.00317.32
8.1.60.0000.00817.35
8.1.50.0050.00317.46
8.1.40.0080.00017.38
8.1.30.0080.00017.41
8.1.20.0050.00317.55
8.1.10.0000.00917.42
8.1.00.0040.00417.23
8.0.300.0000.00718.77
8.0.290.0040.00417.16
8.0.280.0000.00718.37
8.0.270.0070.00017.16
8.0.260.0030.00316.71
8.0.250.0000.00716.99
8.0.240.0080.00016.82
8.0.230.0040.00417.01
8.0.220.0070.00016.91
8.0.210.0000.00716.80
8.0.200.0030.00316.94
8.0.190.0070.00316.91
8.0.180.0070.00016.96
8.0.170.0000.00916.89
8.0.160.0080.00016.87
8.0.150.0040.00416.81
8.0.140.0060.00616.88
8.0.130.0000.00513.33
8.0.120.0000.00716.89
8.0.110.0040.00416.91
8.0.100.0040.00416.77
8.0.90.0040.00417.03
8.0.80.0070.01016.86
8.0.70.0040.00416.86
8.0.60.0040.00416.90
8.0.50.0040.00416.84
8.0.30.0130.00616.92
8.0.20.0110.00817.40
8.0.10.0040.00417.05
8.0.00.0070.01516.67
7.4.330.0020.00215.00
7.4.320.0060.00016.48
7.4.300.0030.00316.52
7.4.290.0070.00016.52
7.4.280.0000.00616.37
7.4.270.0000.00716.50
7.4.260.0070.00016.27
7.4.250.0040.00416.48
7.4.240.0030.00316.49
7.4.230.0040.00416.27
7.4.220.0120.00316.55
7.4.210.0090.00716.43
7.4.200.0070.00016.54
7.4.190.0000.00716.54
7.4.160.0060.00916.30
7.4.150.0070.01017.40
7.4.140.0100.00917.86
7.4.130.0090.00816.37
7.4.120.0110.00916.44
7.4.110.0120.00616.26
7.4.100.0070.01016.26
7.4.90.0110.00716.49
7.4.80.0120.00619.39
7.4.70.0110.00816.60
7.4.60.0120.00916.38
7.4.50.0040.00416.50
7.4.40.0060.00922.77
7.4.30.0060.01016.44
7.4.00.0090.00614.80
7.3.330.0030.00312.98
7.3.320.0000.00513.18
7.3.310.0080.00016.13
7.3.300.0030.00316.24
7.3.290.0080.00516.23
7.3.280.0090.01016.18
7.3.270.0160.00017.40
7.3.260.0070.01016.45
7.3.250.0130.00516.19
7.3.240.0100.00716.41
7.3.230.0070.01416.39
7.3.210.0090.00916.45
7.3.200.0070.01419.39
7.3.190.0130.00416.19
7.3.180.0130.00716.19
7.3.170.0070.00716.27
7.3.160.0060.00916.19
7.3.120.0110.00514.57
7.3.110.0090.00914.82
7.3.100.0030.00914.92
7.3.90.0060.00914.71
7.3.80.0070.00414.70
7.3.70.0060.00914.49
7.3.60.0080.00414.52
7.3.50.0040.00814.63
7.3.40.0100.00714.57
7.3.30.0040.01114.73
7.3.20.0040.00816.47
7.3.10.0090.00616.30
7.3.00.0040.01216.65
7.2.330.0150.00316.26
7.2.320.0030.01316.17
7.2.310.0080.00816.25
7.2.300.0090.00816.37
7.2.290.0090.00916.56
7.2.250.0070.01114.78
7.2.240.0030.01014.64
7.2.230.0000.01614.73
7.2.220.0100.00014.94
7.2.210.0030.00914.60
7.2.200.0040.00814.59
7.2.190.0000.01514.45
7.2.180.0090.00314.90
7.2.170.0070.01014.84
7.2.00.0070.00319.26
7.1.330.0060.01015.65
7.1.320.0040.00415.81
7.1.310.0080.00415.72
7.1.300.0000.01415.43
7.1.290.0000.01415.64
7.1.280.0040.01115.58
7.1.270.0000.01315.53
7.1.260.0000.01515.56
7.1.100.0040.00717.95
7.1.70.0000.01116.72
7.1.60.0070.01019.29
7.1.50.0030.01016.85
7.1.00.0000.08022.48
7.0.200.0040.00416.41
7.0.140.0000.07022.09
7.0.100.0000.08719.89
7.0.90.0070.06019.95
7.0.80.0100.08019.94
7.0.70.0100.07720.00
7.0.60.0030.06320.06
7.0.50.0130.07720.29
7.0.40.0030.06720.04
7.0.30.0030.09020.08
7.0.20.0100.07320.15
7.0.10.0070.05019.98
7.0.00.0070.07320.12
5.6.280.0030.07721.09
5.6.250.0030.05020.60
5.6.240.0100.08020.61
5.6.230.0170.06320.64
5.6.220.0070.06720.55
5.6.210.0030.09020.77
5.6.200.0100.07720.97
5.6.190.0070.08020.96
5.6.180.0100.07720.97
5.6.170.0030.08721.14
5.6.160.0130.07021.06
5.6.150.0070.08321.12
5.6.140.0000.09021.11
5.6.130.0100.08321.04
5.6.120.0070.08021.10
5.6.110.0030.05321.06
5.6.100.0200.06321.03
5.6.90.0000.09020.99
5.6.80.0030.08720.44
5.6.70.0070.08020.55
5.6.60.0030.08320.45
5.6.50.0130.07320.43
5.6.40.0100.08020.47
5.6.30.0170.07020.40
5.6.20.0070.06320.41
5.6.10.0170.07020.46
5.6.00.0100.07020.37
5.5.380.0070.08020.46
5.5.370.0030.08320.45
5.5.360.0070.08020.45
5.5.350.0030.08320.47
5.5.340.0070.04720.93
5.5.330.0000.08720.84
5.5.320.0070.08020.93
5.5.310.0100.08020.88
5.5.300.0170.06720.93
5.5.290.0130.07720.88
5.5.280.0030.08720.84
5.5.270.0100.08020.64
5.5.260.0030.08320.83
5.5.250.0100.04320.73
5.5.240.0070.08320.27
5.5.230.0130.07720.28
5.5.220.0070.04020.24
5.5.210.0200.07320.21
5.5.200.0130.05720.29
5.5.190.0030.06320.18
5.5.180.0130.07320.25
5.5.160.0130.04720.18
5.5.150.0100.06720.21
5.5.140.0070.05020.23
5.5.130.0070.05020.19
5.5.120.0130.08020.00
5.5.110.0100.07320.22
5.5.100.0170.06020.09
5.5.90.0070.07720.05
5.5.80.0070.07320.08
5.5.70.0100.07720.13
5.5.60.0070.07720.15
5.5.50.0070.07720.00
5.5.40.0070.07720.09
5.5.30.0070.05020.08
5.5.20.0070.07719.93
5.5.10.0030.07020.14
5.5.00.0000.04320.02
5.4.450.0030.07319.44
5.4.440.0070.06319.24
5.4.430.0100.07719.40
5.4.420.0070.06319.45
5.4.410.0030.08719.26
5.4.400.0070.05718.98
5.4.390.0170.07019.02
5.4.380.0130.07018.81
5.4.370.0130.07018.81
5.4.360.0100.07319.03
5.4.350.0130.07018.83
5.4.340.0130.07319.07
5.4.320.0100.07019.23
5.4.310.0030.06719.13
5.4.300.0070.07718.80
5.4.290.0070.08319.07
5.4.280.0070.05319.05
5.4.270.0070.07019.22
5.4.260.0100.06019.11
5.4.250.0000.08018.96
5.4.240.0030.07719.02
5.4.230.0070.04319.09
5.4.220.0070.06718.94
5.4.210.0030.07719.04
5.4.200.0070.07719.02
5.4.190.0130.06719.05
5.4.180.0170.06719.09
5.4.170.0100.04019.08
5.4.160.0070.07719.02
5.4.150.0170.06319.09
5.4.140.0100.07316.13
5.4.130.0100.07016.36
5.4.120.0100.04316.28
5.4.110.0100.07316.30
5.4.100.0030.07016.24
5.4.90.0000.09016.49
5.4.80.0100.07316.25
5.4.70.0100.06316.48
5.4.60.0100.06016.39
5.4.50.0130.06316.38
5.4.40.0070.08016.28
5.4.30.0100.06716.32
5.4.20.0130.03316.18
5.4.10.0100.07016.39
5.4.00.0030.07315.81
5.3.290.0100.07714.66
5.3.280.0100.04314.60
5.3.270.0100.07314.46
5.3.260.0030.05714.53
5.3.250.0130.07314.61
5.3.240.0030.08014.59
5.3.230.0100.07014.56
5.3.220.0100.06714.55
5.3.210.0130.07014.44
5.3.200.0070.07714.54
5.3.190.0030.07314.54
5.3.180.0070.06314.52
5.3.170.0100.06714.44
5.3.160.0070.07714.51
5.3.150.0130.06714.57
5.3.140.0070.06314.56
5.3.130.0070.07714.54
5.3.120.0170.07314.56
5.3.110.0070.07714.38
5.3.100.0130.07313.99
5.3.90.0070.08014.01
5.3.80.0130.06314.04
5.3.70.0070.04014.01
5.3.60.0130.06013.79
5.3.50.0100.06713.97
5.3.40.0130.06713.96
5.3.30.0130.06313.88
5.3.20.0170.06713.56
5.3.10.0130.06713.63
5.3.00.0070.07313.60
5.2.170.0030.06311.21
5.2.160.0100.03311.23
5.2.150.0070.06310.92
5.2.140.0070.06311.02
5.2.130.0030.06011.11
5.2.120.0070.05710.95
5.2.110.0070.06011.14
5.2.100.0000.06011.10
5.2.90.0070.06011.12
5.2.80.0070.04311.07
5.2.70.0030.04010.91
5.2.60.0000.06310.89
5.2.50.0070.06011.06
5.2.40.0030.05711.03
5.2.30.0070.06011.06
5.2.20.0070.04310.77
5.2.10.0100.05710.94
5.2.00.0100.05310.65
5.1.60.0030.05710.06
5.1.50.0030.05010.00
5.1.40.0000.05310.04
5.1.30.0070.05010.26
5.1.20.0130.04710.30
5.1.10.0030.05310.07
5.1.00.0000.0579.92
5.0.50.0070.0308.45
5.0.40.0030.0438.46
5.0.30.0030.0738.26
5.0.20.0070.0408.21
5.0.10.0070.0338.19
5.0.00.0000.0408.19
4.4.90.0000.0378.19
4.4.80.0070.0138.19
4.4.70.0030.0378.19
4.4.60.0030.0308.19
4.4.50.0000.0378.19
4.4.40.0070.0508.19
4.4.30.0030.0378.19
4.4.20.0030.0278.19
4.4.10.0030.0378.19
4.4.00.0070.0478.19
4.3.110.0000.0378.19
4.3.100.0000.0378.19
4.3.90.0000.0308.19
4.3.80.0000.0508.19
4.3.70.0000.0338.19
4.3.60.0000.0378.19
4.3.50.0030.0338.19
4.3.40.0000.0538.19
4.3.30.0030.0338.19
4.3.20.0000.0408.19
4.3.10.0030.0308.19
4.3.00.0030.0308.19

preferences:
50.55 ms | 401 KiB | 5 Q