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> <?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.0090.00918.63
8.3.50.0070.01022.04
8.3.40.0100.00718.80
8.3.30.0040.01219.04
8.3.20.0090.00920.32
8.3.10.0040.00423.58
8.3.00.0100.01019.50
8.2.180.0170.00316.63
8.2.170.0120.00322.96
8.2.160.0140.00320.39
8.2.150.0050.00324.18
8.2.140.0000.00724.66
8.2.130.0070.00026.16
8.2.120.0040.00422.28
8.2.110.0100.00622.32
8.2.100.0120.00017.78
8.2.90.0000.00719.05
8.2.80.0040.00418.04
8.2.70.0030.00617.63
8.2.60.0000.00717.91
8.2.50.0040.00418.07
8.2.40.0030.00518.09
8.2.30.0080.00017.93
8.2.20.0070.00017.73
8.2.10.0040.00418.00
8.2.00.0070.00317.68
8.1.280.0030.01025.92
8.1.270.0080.00022.11
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0150.00623.75
8.1.230.0040.00819.14
8.1.220.0000.00717.74
8.1.210.0060.00318.77
8.1.200.0030.00617.22
8.1.190.0040.00417.26
8.1.180.0090.00018.10
8.1.170.0080.00018.51
8.1.160.0040.00421.86
8.1.150.0000.00718.43
8.1.140.0040.00417.41
8.1.130.0000.00717.68
8.1.120.0080.00317.37
8.1.110.0040.00417.40
8.1.100.0000.00817.24
8.1.90.0070.00017.32
8.1.80.0000.00717.32
8.1.70.0000.00717.31
8.1.60.0080.00017.41
8.1.50.0040.00417.37
8.1.40.0040.00417.39
8.1.30.0040.00417.50
8.1.20.0000.00817.48
8.1.10.0030.00517.42
8.1.00.0050.00217.36
8.0.300.0000.00718.77
8.0.290.0030.00317.03
8.0.280.0070.00018.39
8.0.270.0000.00717.24
8.0.260.0000.00716.74
8.0.250.0060.00017.00
8.0.240.0040.00417.02
8.0.230.0000.00716.98
8.0.220.0070.00016.96
8.0.210.0070.00016.82
8.0.200.0050.00516.95
8.0.190.0030.00616.92
8.0.180.0000.00716.93
8.0.170.0040.00416.95
8.0.160.0000.00816.87
8.0.150.0030.00516.94
8.0.140.0050.00216.91
8.0.130.0050.00013.23
8.0.120.0000.00816.88
8.0.110.0000.00716.85
8.0.100.0050.00316.73
8.0.90.0000.00716.75
8.0.80.0070.00716.94
8.0.70.0000.00716.79
8.0.60.0070.00016.71
8.0.50.0060.00316.98
8.0.30.0080.01116.92
8.0.20.0150.00317.40
8.0.10.0000.00716.86
8.0.00.0080.00916.80
7.4.330.0060.00015.00
7.4.320.0030.00316.44
7.4.300.0030.00316.23
7.4.290.0000.00716.38
7.4.280.0040.00316.45
7.4.270.0030.00316.39
7.4.260.0070.00016.36
7.4.250.0040.00416.36
7.4.240.0030.00316.43
7.4.230.0030.00316.19
7.4.220.0150.00816.55
7.4.210.0060.00716.52
7.4.200.0000.00716.52
7.4.190.0000.00816.65
7.4.160.0090.00616.48
7.4.150.0060.01317.40
7.4.140.0180.01317.86
7.4.130.0060.01516.22
7.4.120.0070.01016.43
7.4.110.0070.01116.19
7.4.100.0060.01216.40
7.4.90.0140.00316.61
7.4.80.0070.01019.39
7.4.70.0110.00416.24
7.4.60.0060.01016.46
7.4.50.0030.00516.16
7.4.40.0110.00622.77
7.4.30.0160.00016.41
7.4.00.0090.00714.79
7.3.330.0020.00213.00
7.3.320.0050.00013.13
7.3.310.0070.00016.03
7.3.300.0070.00016.09
7.3.290.0140.00016.20
7.3.280.0060.01216.16
7.3.270.0070.01017.40
7.3.260.0060.01016.40
7.3.250.0130.00616.27
7.3.240.0000.01716.29
7.3.230.0040.01216.39
7.3.210.0120.00916.08
7.3.200.0060.01319.39
7.3.190.0070.01516.30
7.3.180.0100.00616.29
7.3.170.0030.01716.27
7.3.160.0080.00816.34
7.3.120.0030.01314.73
7.3.110.0070.01014.73
7.3.100.0030.01014.69
7.3.90.0060.00914.67
7.3.80.0070.00714.43
7.3.70.0060.00914.48
7.3.60.0040.00414.52
7.3.50.0080.00014.81
7.3.40.0080.00414.71
7.3.30.0000.01414.71
7.3.20.0060.00316.46
7.3.10.0030.00616.39
7.3.00.0030.00616.72
7.2.330.0070.01016.20
7.2.320.0090.01216.40
7.2.310.0150.00916.47
7.2.300.0130.00316.43
7.2.290.0100.00716.27
7.2.250.0030.01614.97
7.2.240.0070.01014.57
7.2.230.0030.00914.76
7.2.220.0040.01115.00
7.2.210.0000.01414.75
7.2.200.0060.00914.50
7.2.190.0030.00914.73
7.2.180.0110.00014.88
7.2.170.0030.01014.68
7.2.00.0000.01219.14
7.1.330.0080.00815.71
7.1.320.0070.01015.69
7.1.310.0070.00715.48
7.1.300.0060.00915.53
7.1.290.0000.01415.61
7.1.280.0070.00715.48
7.1.270.0000.01315.18
7.1.260.0100.00315.39
7.1.100.0030.01018.22
7.1.70.0040.00416.75
7.1.60.0130.01319.33
7.1.50.0070.01516.90
7.1.00.0100.06322.35
7.0.200.0030.00716.52
7.0.140.0030.07022.20
7.0.110.0300.07019.95
7.0.100.0230.07720.00
7.0.90.0200.05019.97
7.0.80.0200.08319.88
7.0.70.0100.08020.07
7.0.60.0100.06320.10
7.0.50.0170.08020.50
7.0.40.0100.06320.25
7.0.30.0100.07020.13
7.0.20.0130.07720.22
7.0.10.0130.07020.11
7.0.00.0030.08720.07
5.6.280.0070.07021.09
5.6.260.0200.07020.61
5.6.250.0100.07720.75
5.6.240.0100.07320.68
5.6.230.0030.08720.48
5.6.220.0070.06320.54
5.6.210.0070.07720.62
5.6.200.0030.08321.04
5.6.190.0170.07720.93
5.6.180.0130.06321.06
5.6.170.0130.07321.29
5.6.160.0070.08721.03
5.6.150.0200.06721.20
5.6.140.0070.05320.94
5.6.130.0230.06721.27
5.6.120.0030.08321.20
5.6.110.0130.08020.98
5.6.100.0030.08321.04
5.6.90.0030.07321.20
5.6.80.0030.08320.53
5.6.70.0130.07320.48
5.6.60.0130.07020.65
5.6.50.0100.04320.54
5.6.40.0170.07320.55
5.6.30.0030.08320.64
5.6.20.0070.05720.59
5.6.10.0200.06720.48
5.6.00.0070.05020.47
5.5.380.0100.07020.42
5.5.370.0000.05320.33
5.5.360.0070.08720.41
5.5.350.0070.08020.44
5.5.340.0130.07320.97
5.5.330.0100.07720.82
5.5.320.0030.08320.93
5.5.310.0030.07020.81
5.5.300.0100.07720.95
5.5.290.0030.08020.71
5.5.280.0070.08020.94
5.5.270.0130.07720.90
5.5.260.0170.07320.89
5.5.250.0070.08020.56
5.5.240.0030.08020.28
5.5.230.0100.08320.37
5.5.220.0030.07720.29
5.5.210.0000.08320.29
5.5.200.0170.04720.20
5.5.190.0130.07320.20
5.5.180.0100.08020.10
5.5.160.0070.07320.30
5.5.150.0100.07720.25
5.5.140.0200.06720.30
5.5.130.0030.08320.10
5.5.120.0100.06720.09
5.5.110.0030.06020.32
5.5.100.0270.05720.06
5.5.90.0070.07720.11
5.5.80.0070.08020.05
5.5.70.0170.05020.10
5.5.60.0030.05020.02
5.5.50.0070.08020.09
5.5.40.0170.07020.17
5.5.30.0100.05020.20
5.5.20.0100.08019.96
5.5.10.0070.08319.96
5.5.00.0170.05720.03
5.4.450.0000.08719.28
5.4.440.0030.05019.31
5.4.430.0170.06719.50
5.4.420.0130.07319.44
5.4.410.0030.07019.36
5.4.400.0130.07319.20
5.4.390.0070.07318.95
5.4.380.0070.07319.13
5.4.370.0030.08019.10
5.4.360.0130.07019.07
5.4.350.0070.08019.03
5.4.340.0100.07018.98
5.4.320.0100.07318.90
5.4.310.0130.06719.00
5.4.300.0000.07719.17
5.4.290.0130.04719.02
5.4.280.0200.06019.02
5.4.270.0070.06719.07
5.4.260.0100.07318.97
5.4.250.0000.08018.94
5.4.240.0100.07319.00
5.4.230.0000.07719.02
5.4.220.0170.05718.94
5.4.210.0130.07019.17
5.4.200.0130.05719.11
5.4.190.0100.07318.94
5.4.180.0070.07319.03
5.4.170.0030.07019.11
5.4.160.0030.04719.09
5.4.150.0030.08019.03
5.4.140.0230.03716.48
5.4.130.0100.07016.20
5.4.120.0030.07716.37
5.4.110.0030.07716.23
5.4.100.0070.06716.29
5.4.90.0100.04016.29
5.4.80.0130.06016.17
5.4.70.0170.05716.36
5.4.60.0000.08016.48
5.4.50.0130.06316.36
5.4.40.0100.07316.54
5.4.30.0070.07316.16
5.4.20.0070.07316.25
5.4.10.0130.06716.38
5.4.00.0100.06715.66
5.3.290.0130.06714.70
5.3.280.0100.07314.71
5.3.270.0030.07314.72
5.3.260.0100.07314.69
5.3.250.0000.08314.57
5.3.240.0070.07714.57
5.3.230.0070.07714.52
5.3.220.0200.06314.66
5.3.210.0130.08714.52
5.3.200.0000.08014.68
5.3.190.0030.05314.37
5.3.180.0130.06714.54
5.3.170.0070.07714.41
5.3.160.0100.07014.52
5.3.150.0030.07314.43
5.3.140.0070.06714.46
5.3.130.0170.07014.47
5.3.120.0030.04714.57
5.3.110.0030.06014.36
5.3.100.0100.06713.95
5.3.90.0000.07714.05
5.3.80.0130.06714.05
5.3.70.0070.06713.82
5.3.60.0030.04313.95
5.3.50.0130.06314.06
5.3.40.0130.05714.02
5.3.30.0070.07013.86
5.3.20.0130.03713.61
5.3.10.0070.05013.76
5.3.00.0070.07313.59
5.2.170.0000.07012.00
5.2.160.0000.03712.00
5.2.150.0070.03312.00
5.2.140.0070.05012.00
5.2.130.0070.05312.00
5.2.120.0030.06312.00
5.2.110.0030.06312.00
5.2.100.0100.05012.00
5.2.90.0070.06012.00
5.2.80.0000.06312.00
5.2.70.0100.03312.00
5.2.60.0070.06012.00
5.2.50.0070.05712.00
5.2.40.0070.04712.00
5.2.30.0030.04012.00
5.2.20.0030.06312.00
5.2.10.0100.05012.00
5.2.00.0070.06712.00
5.1.60.0100.02312.00
5.1.50.0030.05312.00
5.1.40.0100.04012.00
5.1.30.0030.05712.00
5.1.20.0030.04012.00
5.1.10.0070.05312.00
5.1.00.0100.03012.00
5.0.50.0070.03712.00
5.0.40.0000.03312.00
5.0.30.0070.05012.00
5.0.20.0000.04312.00
5.0.10.0000.04712.00
5.0.00.0030.05312.00
4.4.90.0070.03012.00
4.4.80.0030.03712.00
4.4.70.0030.03712.00
4.4.60.0000.03712.00
4.4.50.0030.03312.00
4.4.40.0070.05312.00
4.4.30.0000.02312.00
4.4.20.0000.03712.00
4.4.10.0000.03712.00
4.4.00.0030.04712.00
4.3.110.0030.03712.00
4.3.100.0000.04012.00
4.3.90.0030.01712.00
4.3.80.0000.03712.00
4.3.70.0000.03312.00
4.3.60.0000.01712.00
4.3.50.0000.01712.00
4.3.40.0070.01712.00
4.3.30.0030.01712.00
4.3.20.0000.01712.00
4.3.10.0000.03712.00
4.3.00.0000.01712.00

preferences:
41.91 ms | 401 KiB | 5 Q