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 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.0110.00718.80
8.3.50.0100.00821.95
8.3.40.0110.00318.67
8.3.30.0110.00319.09
8.3.20.0040.00420.46
8.3.10.0080.00023.72
8.3.00.0040.00420.81
8.2.180.0120.00616.60
8.2.170.0090.00622.96
8.2.160.0070.00722.04
8.2.150.0080.00024.18
8.2.140.0000.00724.66
8.2.130.0070.00026.16
8.2.120.0030.00521.00
8.2.110.0090.00622.12
8.2.100.0080.00417.66
8.2.90.0040.00418.95
8.2.80.0050.00317.97
8.2.70.0110.00017.50
8.2.60.0050.00317.80
8.2.50.0050.00318.07
8.2.40.0110.00017.94
8.2.30.0000.00717.86
8.2.20.0000.00817.65
8.2.10.0050.00217.64
8.2.00.0070.00017.62
8.1.280.0120.00625.92
8.1.270.0040.00423.96
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0000.00923.69
8.1.230.0040.00719.14
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0060.00317.23
8.1.190.0000.00817.41
8.1.180.0030.00618.10
8.1.170.0030.00618.59
8.1.160.0000.00721.95
8.1.150.0000.00718.52
8.1.140.0040.00417.32
8.1.130.0000.00717.71
8.1.120.0000.00717.36
8.1.110.0000.00717.35
8.1.100.0070.00017.32
8.1.90.0040.00417.30
8.1.80.0050.00317.32
8.1.70.0030.00317.28
8.1.60.0030.00717.53
8.1.50.0000.00817.43
8.1.40.0090.00017.38
8.1.30.0040.00417.41
8.1.20.0040.00417.36
8.1.10.0070.00017.47
8.1.00.0040.00417.36
8.0.300.0040.00418.77
8.0.290.0000.00717.05
8.0.280.0050.00218.45
8.0.270.0070.00017.16
8.0.260.0060.00016.83
8.0.250.0060.00017.01
8.0.240.0040.00416.99
8.0.230.0000.00716.89
8.0.220.0030.00316.86
8.0.210.0040.00416.93
8.0.200.0030.00316.93
8.0.190.0000.00716.96
8.0.180.0040.00416.82
8.0.170.0040.00416.93
8.0.160.0040.00416.93
8.0.150.0030.00516.80
8.0.140.0000.00716.84
8.0.130.0030.00313.25
8.0.120.0040.00416.92
8.0.110.0030.00616.78
8.0.100.0050.00216.80
8.0.90.0030.00316.93
8.0.80.0090.00916.94
8.0.70.0040.00417.06
8.0.60.0040.00416.93
8.0.50.0040.00417.07
8.0.30.0140.00616.85
8.0.20.0100.01017.40
8.0.10.0040.00416.84
8.0.00.0120.00816.63
7.4.330.0060.00015.07
7.4.320.0000.00716.38
7.4.300.0000.00616.39
7.4.290.0040.00416.37
7.4.280.0030.00316.27
7.4.270.0030.00316.43
7.4.260.0000.00716.22
7.4.250.0000.00716.30
7.4.240.0020.00516.43
7.4.230.0070.00016.49
7.4.220.0120.01216.31
7.4.210.0090.00616.41
7.4.200.0070.00016.27
7.4.190.0030.00316.45
7.4.160.0090.00616.22
7.4.150.0110.00717.40
7.4.140.0160.00417.86
7.4.130.0100.00616.31
7.4.120.0080.00816.42
7.4.110.0000.01716.41
7.4.100.0120.00916.40
7.4.90.0110.01116.45
7.4.80.0120.01416.37
7.4.70.0040.01116.52
7.4.60.0070.01316.51
7.4.50.0030.00616.16
7.4.40.0030.00922.77
7.4.30.0100.00616.57
7.4.00.0120.00314.93
7.3.330.0000.00513.14
7.3.320.0030.00313.14
7.3.310.0000.00816.29
7.3.300.0000.00716.05
7.3.290.0080.01116.22
7.3.280.0100.00816.19
7.3.270.0160.00317.40
7.3.260.0030.01516.14
7.3.250.0120.00816.32
7.3.240.0080.01116.18
7.3.230.0130.00316.39
7.3.210.0090.00916.36
7.3.200.0100.00619.39
7.3.190.0060.01016.16
7.3.180.0040.01116.23
7.3.170.0090.00616.32
7.3.160.0110.00616.43
7.3.120.0120.00314.75
7.3.110.0070.00714.72
7.3.100.0090.00614.76
7.3.90.0040.00714.57
7.3.80.0070.00714.77
7.3.70.0070.01014.72
7.3.60.0040.00714.50
7.3.50.0040.01214.54
7.3.40.0060.00914.64
7.3.30.0100.00314.37
7.3.20.0090.00616.32
7.3.10.0060.01016.44
7.3.00.0130.00716.52
7.2.330.0080.00916.52
7.2.320.0070.01116.25
7.2.310.0120.00916.20
7.2.300.0130.00316.40
7.2.290.0200.00316.36
7.2.240.0100.00314.64
7.2.230.0000.01314.57
7.2.220.0130.00314.59
7.2.210.0120.00314.69
7.2.200.0070.01014.79
7.2.190.0030.01314.59
7.2.180.0110.00714.63
7.2.170.0090.00314.91
7.2.160.0080.00414.81
7.2.150.0000.01216.63
7.2.140.0030.01416.48
7.2.130.0060.01216.66
7.2.120.0050.00716.59
7.2.110.0090.00616.69
7.2.100.0100.00316.80
7.2.90.0070.00916.84
7.2.80.0110.00416.62
7.2.70.0080.00516.66
7.2.60.0050.00716.68
7.2.50.0070.00916.80
7.2.40.0040.01016.57
7.2.30.0070.00816.62
7.2.20.0120.00516.67
7.2.10.0040.00916.72
7.2.00.0090.00817.65
7.1.330.0040.01115.54
7.1.320.0070.00715.55
7.1.310.0070.00415.30
7.1.300.0080.00815.52
7.1.290.0030.01415.66
7.1.280.0140.00315.24
7.1.270.0040.01115.24
7.1.260.0030.00615.67
7.1.250.0070.01015.68
7.1.100.0000.01017.83
7.1.70.0040.00416.77
7.1.60.0130.01319.32
7.1.50.0000.02116.89
7.1.00.0070.07022.27
7.0.200.0050.00516.41
7.0.140.0070.07022.09
7.0.60.0070.07019.91
7.0.50.0130.07317.96
7.0.40.0070.08319.98
7.0.30.0330.06720.13
7.0.20.0400.07320.20
7.0.10.0000.08320.18
7.0.00.0130.03720.18
5.6.280.0030.07321.13
5.6.210.0030.08020.73
5.6.200.0070.03718.18
5.6.190.0070.04020.43
5.6.180.0270.04320.41
5.6.170.0230.07020.71
5.6.160.0070.06020.39
5.6.150.0130.07318.14
5.6.140.0130.07318.14
5.6.130.0100.07718.07
5.6.120.0070.06021.13
5.6.110.0200.06721.12
5.6.100.0000.05321.14
5.6.90.0170.07321.11
5.6.80.0070.04720.49
5.5.350.0300.06320.34
5.5.340.0070.04317.98
5.5.330.0070.08320.40
5.5.320.0100.06720.29
5.5.310.0300.06320.18
5.5.300.0200.03717.88
5.5.290.0130.03018.01
5.5.280.0030.04320.77
5.5.270.0070.08320.90
5.5.260.0100.08020.97
5.5.250.0070.09020.70
5.5.240.0000.08720.27
5.4.450.0570.06319.28
5.4.440.0770.06319.45
5.4.430.0170.04719.13
5.4.420.1000.07019.44
5.4.410.0700.06319.27
5.4.400.0700.05319.22
5.4.390.0830.07019.25
5.4.380.0370.05018.66
5.4.370.0330.05318.59
5.4.360.0300.06018.67
5.4.350.0270.06018.78
5.4.340.0430.05718.48
5.4.320.0100.03312.48
5.4.310.0060.03912.48
5.4.300.0070.03612.48
5.4.290.0070.04112.48
5.4.280.0030.03712.37
5.4.270.0060.03712.37
5.4.260.0090.05112.38
5.4.250.0070.04212.37
5.4.240.0040.03712.38
5.4.230.0050.04012.37
5.4.220.0060.03712.37
5.4.210.0030.03612.36
5.4.200.0050.03912.37
5.4.190.0130.04412.34
5.4.180.0170.04212.34
5.4.170.0210.04112.35
5.4.160.0180.04112.34
5.4.150.0150.04412.34
5.4.140.0150.04212.03
5.4.130.0120.04512.01
5.4.120.0130.04311.97
5.4.110.0110.04411.97
5.4.100.0240.06311.97
5.4.90.0160.04111.97
5.4.80.0140.04311.97
5.4.70.0170.03911.96
5.4.60.0140.04211.97
5.4.50.0150.07311.96
5.4.40.0130.04411.96
5.4.30.0140.04511.95
5.4.20.0170.04211.94
5.4.10.0240.03611.95
5.4.00.0170.03911.45
5.3.290.0090.03812.80
5.3.280.0050.03812.71
5.3.270.0200.04012.72
5.3.260.0140.04512.72
5.3.250.0150.04512.72
5.3.240.0170.04512.72
5.3.230.0180.04512.71
5.3.220.0210.04012.68
5.3.210.0290.06212.68
5.3.200.0150.04512.68
5.3.190.0280.06612.68
5.3.180.0150.04612.67
5.3.170.0160.04712.67
5.3.160.0220.04512.68
5.3.150.0210.04412.67
5.3.140.0300.06612.66
5.3.130.0190.04312.65
5.3.120.0270.06312.66
5.3.110.0160.04712.66
5.3.100.0280.09412.12
5.3.90.0140.04512.09
5.3.80.0150.04612.07
5.3.70.0270.09512.08
5.3.60.0190.04412.07
5.3.50.0160.04612.00
5.3.40.0140.04512.00
5.3.30.0170.04011.95
5.3.20.0100.04811.72
5.3.10.0140.04411.68
5.3.00.0190.04011.67
5.2.170.0160.0319.18
5.2.160.0130.0369.18
5.2.150.0140.0339.18
5.2.140.0100.0369.18
5.2.130.0150.0319.14
5.2.120.0130.0339.14
5.2.110.0100.0399.14
5.2.100.0160.0599.14
5.2.90.0130.0329.14
5.2.80.0200.0269.13
5.2.70.0140.0329.13
5.2.60.0080.0389.09
5.2.50.0270.0519.05
5.2.40.0180.0329.03
5.2.30.0110.0359.00
5.2.20.0110.0359.00
5.2.10.0110.0358.92
5.2.00.0140.0318.78
5.1.60.0100.0298.07
5.1.50.0110.0288.06
5.1.40.0100.0308.05
5.1.30.0160.0568.39
5.1.20.0100.0318.42
5.1.10.0140.0288.14
5.1.00.0090.0328.14
5.0.50.0090.0256.63
5.0.40.0070.0246.48
5.0.30.0180.0576.29
5.0.20.0090.0236.27
5.0.10.0080.0236.25
5.0.00.0090.0346.24
4.4.90.0050.0194.78
4.4.80.0090.0154.76
4.4.70.0050.0204.75
4.4.60.0050.0204.75
4.4.50.0090.0154.77
4.4.40.0090.0264.71
4.4.30.0150.0404.76
4.4.20.0090.0154.84
4.4.10.0050.0214.85
4.4.00.0080.0274.76
4.3.110.0100.0184.66
4.3.100.0100.0154.66
4.3.90.0040.0194.63
4.3.80.0150.0494.59
4.3.70.0050.0194.63
4.3.60.0050.0194.63
4.3.50.0060.0184.62
4.3.40.0060.0274.54
4.3.30.0030.0203.31
4.3.20.0070.0163.29
4.3.10.0030.0193.25
4.3.00.0100.0237.76

preferences:
47.16 ms | 401 KiB | 5 Q