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@example.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.60.0090.00618.55
8.3.50.0120.00721.92
8.3.40.0120.00318.79
8.3.30.0130.00318.74
8.3.20.0040.00418.77
8.3.10.0050.00320.61
8.3.00.0040.00423.61
8.2.180.0150.00416.63
8.2.170.0040.01422.96
8.2.160.0030.01620.47
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0050.00226.16
8.2.120.0060.00319.11
8.2.110.0000.00920.58
8.2.100.0090.00317.78
8.2.90.0000.00819.01
8.2.80.0060.00317.97
8.2.70.0000.01017.50
8.2.60.0000.00817.66
8.2.50.0000.00818.07
8.2.40.0060.00318.09
8.2.30.0030.00717.86
8.2.20.0040.00417.60
8.2.10.0040.00417.68
8.2.00.0060.00317.50
8.1.280.0070.01325.92
8.1.270.0000.00723.99
8.1.260.0100.01026.35
8.1.250.0040.00428.09
8.1.240.0090.00022.18
8.1.230.0100.00017.42
8.1.220.0000.00817.74
8.1.210.0030.00518.77
8.1.200.0030.00617.23
8.1.190.0040.00417.29
8.1.180.0040.00418.10
8.1.170.0040.00418.79
8.1.160.0040.00418.77
8.1.150.0000.00918.56
8.1.140.0000.00717.29
8.1.130.0030.00617.73
8.1.120.0040.00417.34
8.1.110.0000.00717.29
8.1.100.0080.00017.36
8.1.90.0000.00817.32
8.1.80.0000.00717.36
8.1.70.0000.00717.32
8.1.60.0040.00417.35
8.1.50.0040.00417.34
8.1.40.0040.00417.44
8.1.30.0060.00317.59
8.1.20.0050.00317.60
8.1.10.0040.00417.48
8.1.00.0030.00617.43
8.0.300.0080.00018.77
8.0.290.0000.00716.75
8.0.280.0040.00418.38
8.0.270.0070.00017.07
8.0.260.0030.00716.73
8.0.250.0000.00816.95
8.0.240.0000.00816.96
8.0.230.0080.00016.95
8.0.220.0030.00316.75
8.0.210.0000.00816.84
8.0.200.0030.00316.98
8.0.190.0000.00716.98
8.0.180.0070.00016.82
8.0.170.0070.00016.90
8.0.160.0000.00716.97
8.0.150.0000.00816.74
8.0.140.0040.00416.82
8.0.130.0060.00013.25
8.0.120.0000.00716.84
8.0.110.0040.00416.96
8.0.100.0070.00216.88
8.0.90.0030.00616.82
8.0.80.0060.00916.78
8.0.70.0070.00016.75
8.0.60.0070.00017.03
8.0.50.0040.00416.85
8.0.30.0030.01616.90
8.0.20.0100.00817.40
8.0.10.0000.00917.04
8.0.00.0070.01216.65
7.4.330.0000.00514.64
7.4.320.0090.00016.38
7.4.300.0030.00316.47
7.4.290.0030.00316.38
7.4.280.0000.00716.39
7.4.270.0040.00416.38
7.4.260.0000.00613.21
7.4.250.0040.00416.31
7.4.240.0000.00716.43
7.4.230.0000.00716.22
7.4.220.0120.00916.48
7.4.210.0060.01016.44
7.4.200.0000.00716.38
7.4.190.0040.00416.64
7.4.160.0180.00616.49
7.4.150.0120.00617.40
7.4.140.0100.00717.86
7.4.130.0100.00716.35
7.4.120.0100.00716.40
7.4.110.0090.01216.36
7.4.100.0090.01116.35
7.4.90.0070.01016.53
7.4.80.0030.01319.04
7.4.70.0060.00916.30
7.4.60.0090.00916.07
7.4.50.0000.00916.38
7.4.40.0030.01222.27
7.4.30.0060.01616.30
7.4.00.0100.00714.79
7.3.330.0030.00313.04
7.3.320.0000.00613.02
7.3.310.0000.00716.26
7.3.300.0000.00716.20
7.3.290.0080.01116.19
7.3.280.0100.00916.24
7.3.270.0140.00317.40
7.3.260.0080.01218.24
7.3.250.0090.01116.15
7.3.240.0090.01216.20
7.3.230.0090.01516.39
7.3.210.0140.00316.21
7.3.200.0120.00919.39
7.3.190.0070.01416.23
7.3.180.0130.00716.37
7.3.170.0090.00916.27
7.3.160.0060.01016.20
7.3.120.0080.01014.78
7.3.110.0050.01314.54
7.3.100.0030.01414.92
7.3.90.0100.00614.60
7.3.80.0050.01014.86
7.3.70.0020.01014.77
7.3.60.0060.00614.60
7.3.50.0020.00914.57
7.3.40.0030.00914.71
7.3.30.0040.00914.62
7.3.20.0070.00516.40
7.3.10.0030.00916.43
7.3.00.0040.01116.63
7.2.330.0120.00616.27
7.2.320.0140.00316.51
7.2.310.0130.01316.47
7.2.300.0110.01116.48
7.2.290.0110.00616.41
7.2.250.0080.01114.87
7.2.240.0020.01514.86
7.2.230.0060.01114.87
7.2.220.0020.01414.84
7.2.210.0030.01114.73
7.2.200.0030.00914.66
7.2.190.0050.00714.72
7.2.180.0050.00714.64
7.2.170.0040.00714.92
7.2.110.0280.01416.48
7.2.00.0100.00719.04
7.1.330.0040.01115.56
7.1.320.0050.01115.64
7.1.310.0050.01115.47
7.1.300.0080.00515.49
7.1.290.0040.01115.47
7.1.280.0070.00515.45
7.1.270.0060.00915.59
7.1.260.0060.00615.58
7.1.100.0000.01117.98
7.1.70.0030.00716.63
7.1.60.0030.02219.40
7.1.50.0080.01516.82
7.1.00.0000.03722.36
7.0.200.0040.00416.68
7.0.140.0130.06322.15
7.0.60.0130.06021.82
7.0.50.0070.07721.97
7.0.40.0100.07320.04
7.0.30.0100.08020.11
7.0.20.0070.07020.08
7.0.10.0030.05320.18
7.0.00.0070.07720.10
5.6.280.0030.07321.08
5.6.210.0130.07320.68
5.6.200.0030.09021.03
5.6.190.0030.07021.06
5.6.180.0030.08021.02
5.6.170.0100.07321.11
5.6.160.0070.06721.11
5.6.150.0030.08021.02
5.6.140.0100.07720.99
5.6.130.0030.08721.15
5.6.120.0000.08020.89
5.6.110.0100.08021.14
5.6.100.0100.06321.02
5.6.90.0130.07320.98
5.6.80.0070.08020.39
5.6.70.0070.05720.39
5.6.60.0070.07720.52
5.6.50.0000.07320.43
5.6.40.0100.07020.40
5.6.30.0000.08720.49
5.6.20.0030.08020.38
5.6.10.0030.06320.36
5.6.00.0100.07020.32
5.5.350.0030.06720.45
5.5.340.0070.07720.79
5.5.330.0030.08020.85
5.5.320.0100.08320.78
5.5.310.0030.07020.97
5.5.300.0100.07720.66
5.5.290.0100.08020.88
5.5.280.0070.04020.72
5.5.270.0130.06720.68
5.5.260.0030.08320.96
5.5.250.0070.07320.61
5.5.240.0030.07020.20
5.5.230.0000.07720.16
5.5.220.0000.08320.18
5.5.210.0070.07320.03
5.5.200.0030.08020.24
5.5.190.0000.08320.21
5.5.180.0100.07720.12
5.5.160.0070.07720.04
5.5.150.0100.03320.12
5.5.140.0030.03720.22
5.5.130.0000.04320.23
5.5.120.0030.03720.13
5.5.110.0030.04020.10
5.5.100.0030.03320.02
5.5.90.0030.03020.12
5.5.80.0070.03320.01
5.5.70.0070.03720.17
5.5.60.0000.03320.00
5.5.50.0000.03720.04
5.5.40.0000.05020.09
5.5.30.0030.03320.00
5.5.20.0000.03720.00
5.5.10.0000.03320.07
5.5.00.0030.03320.14
5.4.450.0000.08319.18
5.4.440.0000.08719.30
5.4.430.0100.07719.16
5.4.420.0000.08019.17
5.4.410.0000.08319.34
5.4.400.0100.06718.86
5.4.390.0000.08318.85
5.4.380.0070.07018.85
5.4.370.0070.05318.84
5.4.360.0070.07319.17
5.4.350.0000.07719.15
5.4.340.0030.06319.00
5.4.320.0030.07719.17
5.4.310.0070.03318.93
5.4.300.0030.05019.05
5.4.290.0000.03718.96
5.4.280.0030.03719.00
5.4.270.0030.03319.20
5.4.260.0030.03718.95
5.4.250.0030.02719.16
5.4.240.0030.03018.84
5.4.230.0000.03318.84
5.4.220.0030.03319.00
5.4.210.0000.03718.84
5.4.200.0070.03319.15
5.4.190.0000.03019.00
5.4.180.0030.03718.81
5.4.170.0000.03318.84
5.4.160.0000.04019.08
5.4.150.0070.03318.98
5.4.140.0030.02716.29
5.4.130.0000.03016.37
5.4.120.0000.03016.30
5.4.110.0000.03016.28
5.4.100.0000.03016.25
5.4.90.0030.02716.41
5.4.80.0000.03016.39
5.4.70.0070.02716.29
5.4.60.0000.03316.17
5.4.50.0030.05316.30
5.4.40.0030.06316.27
5.4.30.0070.07016.24
5.4.20.0070.06716.22
5.4.10.0030.05716.35
5.4.00.0070.06715.80
5.3.290.0030.03714.64
5.3.280.0000.04314.48
5.3.270.0000.03014.60
5.3.260.0000.03714.57
5.3.250.0030.03014.53
5.3.240.0000.03014.54
5.3.230.0030.03014.60
5.3.220.0000.03014.51
5.3.210.0000.03014.51
5.3.200.0000.03014.57
5.3.190.0000.03014.53
5.3.180.0000.03014.50
5.3.170.0000.03014.48
5.3.160.0000.03314.53
5.3.150.0030.04014.50
5.3.140.0070.07014.52
5.3.130.0000.05714.50
5.3.120.0030.05314.50
5.3.110.0070.07014.51
5.3.100.0030.07313.84
5.3.90.0070.07313.86
5.3.80.0130.05014.00
5.3.70.0070.07013.98
5.3.60.0000.05713.99
5.3.50.0030.07013.72
5.3.40.0070.07313.88
5.3.30.0030.06713.91
5.3.20.0070.06313.63
5.3.10.0030.06713.52
5.3.00.0000.07713.63
5.2.170.0030.06311.00
5.2.160.0000.06010.99
5.2.150.0030.05711.19
5.2.140.0030.05010.98
5.2.130.0000.06311.10
5.2.120.0030.06010.90
5.2.110.0030.06011.15
5.2.100.0070.04311.10
5.2.90.0030.06310.96
5.2.80.0070.06011.09
5.2.70.0000.04711.15
5.2.60.0030.06310.92
5.2.50.0000.06711.04
5.2.40.0030.04711.02
5.2.30.0070.06010.81
5.2.20.0070.05011.01
5.2.10.0030.05010.89
5.2.00.0030.06010.72
5.1.60.0000.05010.08
5.1.50.0100.04710.08
5.1.40.0030.04710.08
5.1.30.0030.05310.41
5.1.20.0000.05010.42
5.1.10.0070.04710.08
5.1.00.0030.05310.08
5.0.50.0000.04310.08
5.0.40.0000.03310.08
5.0.30.0000.06010.08
5.0.20.0000.04310.08
5.0.10.0030.04310.08
5.0.00.0030.06010.08
4.4.90.0000.03310.08
4.4.80.0000.03310.08
4.4.70.0030.03710.08
4.4.60.0030.03710.08
4.4.50.0000.03710.08
4.4.40.0000.05710.08
4.4.30.0000.03710.08
4.4.20.0000.03710.08
4.4.10.0030.03310.08
4.4.00.0000.04710.08
4.3.110.0000.03310.08
4.3.100.0030.03310.08
4.3.90.0030.03010.08
4.3.80.0030.05010.08
4.3.70.0000.03710.08
4.3.60.0000.03710.08
4.3.50.0030.03710.08
4.3.40.0000.05710.08
4.3.30.0000.03310.08
4.3.20.0000.03710.08
4.3.10.0000.03710.08
4.3.00.0000.03710.08

preferences:
47.54 ms | 401 KiB | 5 Q