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> <? } 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.0070.00718.81
8.3.50.0050.01021.93
8.3.40.0140.00018.89
8.3.30.0140.00718.65
8.3.20.0050.00318.76
8.3.10.0120.00320.48
8.3.00.0040.00421.86
8.2.180.0060.01216.50
8.2.170.0110.00422.96
8.2.160.0100.00320.57
8.2.150.0030.00624.18
8.2.140.0050.00324.66
8.2.130.0020.00526.16
8.2.120.0080.00019.23
8.2.110.0000.00922.26
8.2.100.0090.00317.78
8.2.90.0000.00817.84
8.2.80.0040.00417.97
8.2.70.0030.00717.63
8.2.60.0030.00617.91
8.2.50.0030.00518.07
8.2.40.0070.00418.16
8.2.30.0080.00019.73
8.2.20.0000.00717.47
8.2.10.0020.00517.54
8.2.00.0050.00217.61
8.1.280.0090.00625.92
8.1.270.0040.00423.99
8.1.260.0000.00726.35
8.1.250.0080.00028.09
8.1.240.0060.00322.02
8.1.230.0120.00021.04
8.1.220.0000.00817.74
8.1.210.0050.00518.77
8.1.200.0060.00317.10
8.1.190.0070.00017.28
8.1.180.0080.00018.10
8.1.170.0080.00018.53
8.1.160.0070.00018.77
8.1.150.0040.00418.38
8.1.140.0030.00517.34
8.1.130.0040.00417.76
8.1.120.0040.00417.30
8.1.110.0040.00417.30
8.1.100.0070.00017.23
8.1.90.0040.00417.37
8.1.80.0000.00717.34
8.1.70.0030.00317.27
8.1.60.0060.00317.46
8.1.50.0000.00817.41
8.1.40.0040.00417.41
8.1.30.0000.00717.48
8.1.20.0040.00417.54
8.1.10.0000.00817.41
8.1.00.0080.00017.43
8.0.300.0000.00719.96
8.0.290.0070.00016.58
8.0.280.0000.00718.38
8.0.270.0000.00717.27
8.0.260.0030.00316.71
8.0.250.0060.00316.96
8.0.240.0000.01116.98
8.0.230.0070.00016.86
8.0.220.0070.00016.95
8.0.210.0000.00716.77
8.0.200.0000.00717.00
8.0.190.0040.00416.98
8.0.180.0040.00416.82
8.0.170.0040.00416.97
8.0.160.0040.00416.90
8.0.150.0040.00416.92
8.0.140.0000.00716.85
8.0.130.0050.00313.29
8.0.120.0000.00716.90
8.0.110.0000.00816.85
8.0.100.0040.00416.72
8.0.90.0000.00717.03
8.0.80.0000.01416.77
8.0.70.0040.00416.85
8.0.60.0040.00416.78
8.0.50.0070.00016.77
8.0.30.0100.00917.15
8.0.20.0170.01017.40
8.0.10.0030.00716.89
8.0.00.0110.00616.56
7.4.330.0050.00014.77
7.4.320.0030.00316.30
7.4.300.0030.00316.49
7.4.290.0080.00016.48
7.4.280.0000.00816.49
7.4.270.0030.00316.48
7.4.260.0030.00313.27
7.4.250.0040.00416.39
7.4.240.0000.00716.37
7.4.230.0000.00716.49
7.4.220.0130.00916.51
7.4.210.0090.00816.44
7.4.200.0040.00416.41
7.4.190.0020.00416.38
7.4.160.0130.00316.33
7.4.150.0030.01517.40
7.4.140.0080.01017.86
7.4.130.0110.00616.47
7.4.120.0090.00816.21
7.4.110.0110.00716.21
7.4.100.0100.00716.51
7.4.90.0070.01616.57
7.4.80.0070.01719.37
7.4.70.0100.01016.42
7.4.60.0090.00616.52
7.4.50.0060.00316.32
7.4.40.0110.00322.27
7.4.30.0100.01016.45
7.4.00.0110.00314.69
7.3.330.0000.00513.16
7.3.320.0050.00013.14
7.3.310.0070.00016.04
7.3.300.0000.00716.19
7.3.290.0030.01016.19
7.3.280.0100.00616.23
7.3.270.0090.01217.40
7.3.260.0080.00818.24
7.3.250.0100.01116.33
7.3.240.0040.01216.46
7.3.230.0130.00316.46
7.3.210.0110.00616.35
7.3.200.0150.00619.39
7.3.190.0090.00916.38
7.3.180.0100.00616.54
7.3.170.0110.00816.46
7.3.160.0120.00416.26
7.3.120.0070.00714.75
7.2.330.0150.00316.31
7.2.320.0090.00616.21
7.2.310.0190.00316.23
7.2.300.0080.00816.07
7.2.290.0080.00816.14
7.2.60.0110.00416.99
7.2.00.0070.01119.36
7.1.200.0190.00615.71
7.1.100.0030.00718.03
7.1.70.0000.00917.15
7.1.60.0130.01019.40
7.1.50.0090.01216.96
7.1.00.0070.07322.54
7.0.200.0040.00416.73
7.0.140.0100.06722.05
7.0.60.0000.08721.73
7.0.50.0030.08022.00
7.0.40.0030.08719.93
7.0.30.0100.07720.14
7.0.20.0030.07319.96
7.0.10.0030.08320.03
7.0.00.0000.07020.02
5.6.280.0070.07020.81
5.6.210.0070.08020.50
5.6.200.0030.08321.14
5.6.190.0070.08021.04
5.6.180.0030.08321.04
5.6.170.0000.07721.13
5.6.160.0000.09021.00
5.6.150.0030.07721.01
5.6.140.0100.07721.01
5.6.130.0070.08021.06
5.6.120.0030.08321.14
5.6.110.0130.07721.08
5.6.100.0000.08321.13
5.6.90.0070.08321.02
5.6.80.0130.07320.41
5.6.70.0070.07320.35
5.6.60.0030.07320.48
5.6.50.0070.07320.41
5.6.40.0130.07020.45
5.6.30.0030.08320.27
5.6.20.0070.07020.36
5.6.10.0130.06320.41
5.6.00.0030.07720.44
5.5.350.0100.07720.47
5.5.340.0030.05320.91
5.5.330.0030.08320.78
5.5.320.0070.08020.88
5.5.310.0000.08320.78
5.5.300.0000.08020.77
5.5.290.0030.06020.89
5.5.280.0030.06320.94
5.5.270.0070.08020.88
5.5.260.0170.06320.78
5.5.250.0000.08720.70
5.5.240.0030.07720.06
5.5.230.0100.06720.27
5.5.220.0070.07320.18
5.5.210.0100.07020.29
5.5.200.0000.07020.10
5.5.190.0070.07720.22
5.5.180.0130.07720.16
5.5.160.0030.07720.25
5.5.150.0030.06320.20
5.5.140.0000.08020.17
5.5.130.0070.06720.00
5.5.120.0100.05720.23
5.5.110.0070.07320.13
5.5.100.0100.07020.14
5.5.90.0100.07020.08
5.5.80.0130.06720.00
5.5.70.0100.05720.02
5.5.60.0030.07320.10
5.5.50.0070.07020.00
5.5.40.0030.07719.97
5.5.30.0030.05320.11
5.5.20.0030.06720.20
5.5.10.0070.07320.14
5.5.00.0000.08320.05
5.4.450.0100.07319.23
5.4.440.0000.08319.49
5.4.430.0070.05719.29
5.4.420.0070.07719.38
5.4.410.0070.06719.22
5.4.400.0000.07719.06
5.4.390.0030.07319.20
5.4.380.0070.07018.95
5.4.370.0000.06319.01
5.4.360.0070.07719.01
5.4.350.0000.07318.90
5.4.340.0170.06719.20
5.4.320.0000.06319.00
5.4.310.0130.06719.07
5.4.300.0100.07319.07
5.4.290.0000.07719.09
5.4.280.0030.07318.95
5.4.270.0030.07319.16
5.4.260.0030.07019.10
5.4.250.0030.08019.01
5.4.240.0030.07318.89
5.4.230.0100.07019.07
5.4.220.0070.07719.05
5.4.210.0030.06319.05
5.4.200.0100.06318.87
5.4.190.0100.07018.98
5.4.180.0070.06019.16
5.4.170.0070.06719.00
5.4.160.0030.08018.90
5.4.150.0070.06318.89
5.4.140.0000.07316.41
5.4.130.0100.07016.28
5.4.120.0000.05316.36
5.4.110.0030.07316.45
5.4.100.0000.07716.30
5.4.90.0070.07016.30
5.4.80.0000.07716.23
5.4.70.0070.06716.40
5.4.60.0070.06316.16
5.4.50.0000.07316.27
5.4.40.0030.07016.28
5.4.30.0000.07316.27
5.4.20.0070.06316.45
5.4.10.0070.06716.38
5.4.00.0030.07015.75
5.3.290.0070.07314.67
5.3.280.0030.06714.59
5.3.270.0030.07714.60
5.3.260.0100.06314.59
5.3.250.0070.07714.59
5.3.240.0030.07714.45
5.3.230.0030.06014.58
5.3.220.0030.04314.56
5.3.210.0030.07314.51
5.3.200.0030.07714.51
5.3.190.0000.07714.41
5.3.180.0030.04714.56
5.3.170.0000.08014.52
5.3.160.0030.06714.42
5.3.150.0030.07314.54
5.3.140.0030.05314.43
5.3.130.0070.05714.35
5.3.120.0030.07714.48
5.3.110.0130.06314.41
5.3.100.0030.07314.00
5.3.90.0000.06713.82
5.3.80.0000.05714.02
5.3.70.0000.04014.01
5.3.60.0030.07713.87
5.3.50.0030.03713.89
5.3.40.0030.06013.93
5.3.30.0030.07013.86
5.3.20.0070.06313.56
5.3.10.0070.06313.65
5.3.00.0000.07313.55
5.2.170.0000.03311.00
5.2.160.0070.03711.11
5.2.150.0030.05711.16
5.2.140.0000.05011.17
5.2.130.0030.06011.09
5.2.120.0030.05711.15
5.2.110.0000.05311.11
5.2.100.0030.05310.95
5.2.90.0000.06011.11
5.2.80.0030.06010.89
5.2.70.0000.06711.11
5.2.60.0000.05711.08
5.2.50.0070.05011.07
5.2.40.0070.04310.94
5.2.30.0000.05710.82
5.2.20.0030.05710.97
5.2.10.0070.05010.88
5.2.00.0000.06710.72
5.1.60.0000.05010.00
5.1.50.0070.0509.89
5.1.40.0100.0479.87
5.1.30.0000.05310.35
5.1.20.0030.05310.33
5.1.10.0100.05010.07
5.1.00.0100.0479.92
5.0.50.0000.0479.18
5.0.40.0070.0379.18
5.0.30.0030.0539.18
5.0.20.0000.0409.18
5.0.10.0000.0409.18
5.0.00.0000.0679.18
4.4.90.0030.0339.18
4.4.80.0000.0309.18
4.4.70.0000.0309.18
4.4.60.0030.0379.18
4.4.50.0030.0339.18
4.4.40.0000.0509.18
4.4.30.0030.0339.18
4.4.20.0000.0339.18
4.4.10.0000.0339.18
4.4.00.0130.0439.18
4.3.110.0030.0309.18
4.3.100.0000.0339.18
4.3.90.0000.0379.18
4.3.80.0000.0539.18
4.3.70.0030.0309.18
4.3.60.0000.0339.18
4.3.50.0000.0379.18
4.3.40.0070.0439.18
4.3.30.0030.0239.18
4.3.20.0000.0279.18
4.3.10.0030.0379.18
4.3.00.0000.0379.18

preferences:
44.65 ms | 401 KiB | 5 Q