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> <?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.0140.00718.56
8.3.50.0070.00921.98
8.3.40.0120.00318.85
8.3.30.0000.02118.93
8.3.20.0070.00020.50
8.3.10.0040.00422.04
8.3.00.0040.00422.55
8.2.180.0100.00616.63
8.2.170.0120.00322.96
8.2.160.0140.00320.86
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0000.00719.36
8.2.110.0060.00320.52
8.2.100.0110.00017.91
8.2.90.0030.00518.80
8.2.80.0000.00817.97
8.2.70.0030.00517.50
8.2.60.0040.00417.68
8.2.50.0090.00018.07
8.2.40.0090.00018.09
8.2.30.0050.00317.94
8.2.20.0040.00417.58
8.2.10.0000.00717.62
8.2.00.0040.00417.70
8.1.280.0090.00625.92
8.1.270.0080.00023.87
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0030.00620.87
8.1.230.0030.00717.42
8.1.220.0060.00317.74
8.1.210.0000.00818.77
8.1.200.0000.00917.10
8.1.190.0040.00417.41
8.1.180.0050.00318.10
8.1.170.0030.00618.57
8.1.160.0040.00421.96
8.1.150.0040.00418.59
8.1.140.0000.00717.36
8.1.130.0000.00717.64
8.1.120.0000.00717.38
8.1.110.0000.00717.22
8.1.100.0040.00417.38
8.1.90.0030.00617.32
8.1.80.0000.00717.23
8.1.70.0030.00317.32
8.1.60.0000.00917.47
8.1.50.0040.00417.43
8.1.40.0030.00517.29
8.1.30.0000.00817.54
8.1.20.0000.00917.57
8.1.10.0000.00817.49
8.1.00.0030.00617.24
8.0.300.0070.00018.77
8.0.290.0040.00416.75
8.0.280.0000.00818.26
8.0.270.0000.00717.20
8.0.260.0000.00816.83
8.0.250.0070.00017.03
8.0.240.0040.00716.98
8.0.230.0070.00016.95
8.0.220.0000.00816.91
8.0.210.0070.00016.91
8.0.200.0040.00416.89
8.0.190.0030.00316.93
8.0.180.0070.00016.87
8.0.170.0000.00716.87
8.0.160.0040.00416.87
8.0.150.0040.00416.89
8.0.140.0000.00716.88
8.0.130.0030.00313.25
8.0.120.0040.00416.93
8.0.110.0000.00716.89
8.0.100.0000.00716.90
8.0.90.0000.00716.99
8.0.80.0060.00916.79
8.0.70.0000.00716.80
8.0.60.0040.00416.90
8.0.50.0040.00416.88
8.0.30.0120.00716.98
8.0.20.0110.00717.40
8.0.10.0000.00717.02
8.0.00.0080.01216.59
7.4.330.0030.00315.00
7.4.320.0060.00016.37
7.4.300.0000.00616.31
7.4.290.0030.00316.38
7.4.280.0070.00016.38
7.4.270.0030.00316.32
7.4.260.0030.00316.38
7.4.250.0040.00416.36
7.4.240.0050.00216.41
7.4.230.0040.00416.48
7.4.220.0140.01016.44
7.4.210.0060.00816.48
7.4.200.0030.00316.45
7.4.190.0030.00316.34
7.4.160.0090.00616.29
7.4.150.0130.00917.40
7.4.140.0100.01017.86
7.4.130.0080.01016.28
7.4.120.0100.00916.51
7.4.110.0130.01016.55
7.4.100.0140.01016.50
7.4.90.0150.00716.23
7.4.80.0110.00816.31
7.4.70.0060.01216.50
7.4.60.0080.00816.57
7.4.50.0000.00816.25
7.4.40.0060.00822.77
7.4.30.0030.01316.36
7.4.10.0060.01214.96
7.4.00.0100.00214.86
7.3.330.0030.00313.15
7.3.320.0000.00513.03
7.3.310.0030.00316.07
7.3.300.0070.00016.12
7.3.290.0090.00916.09
7.3.280.0080.01116.19
7.3.270.0060.01017.40
7.3.260.0060.01016.42
7.3.250.0110.00616.20
7.3.240.0070.01016.13
7.3.230.0090.01316.39
7.3.210.0070.01016.35
7.3.200.0080.01419.39
7.3.190.0060.01016.16
7.3.180.0100.00716.21
7.3.170.0060.01016.27
7.3.160.0000.01616.34
7.3.130.0070.01014.66
7.3.120.0080.00714.48
7.3.110.0120.00614.65
7.3.100.0030.00914.58
7.3.90.0080.00414.50
7.3.80.0070.00414.80
7.3.70.0000.01514.48
7.3.60.0110.00314.71
7.3.50.0050.00814.42
7.3.40.0080.00814.53
7.3.30.0000.01314.25
7.3.20.0060.00916.43
7.3.10.0030.01416.73
7.3.00.0070.00716.43
7.2.330.0090.00916.20
7.2.320.0050.01416.50
7.2.310.0170.00616.53
7.2.300.0080.00816.30
7.2.290.0060.01216.43
7.2.260.0000.01514.83
7.2.250.0040.01114.64
7.2.240.0100.00614.76
7.2.230.0170.00014.60
7.2.220.0000.01414.72
7.2.210.0080.00814.97
7.2.200.0090.00614.61
7.2.190.0090.00614.63
7.2.180.0060.00814.45
7.2.170.0030.01014.81
7.2.160.0110.00414.86
7.2.150.0060.00616.64
7.2.140.0060.00616.66
7.2.130.0070.01016.74
7.2.120.0090.00916.59
7.2.110.0070.00716.54
7.2.100.0030.01116.40
7.2.90.0030.01016.60
7.2.80.0060.00916.68
7.2.70.0100.00316.75
7.2.60.0030.01316.46
7.2.50.0040.01116.25
7.2.40.0030.00716.49
7.2.30.0060.00316.44
7.2.20.0030.01216.59
7.2.10.0050.00416.79
7.2.00.0020.01317.88
7.1.330.0030.01015.46
7.1.320.0040.00715.50
7.1.310.0070.00715.39
7.1.300.0090.00315.23
7.1.290.0100.00315.36
7.1.280.0030.00615.36
7.1.270.0030.01015.51
7.1.260.0060.00915.32
7.1.250.0000.01315.49
7.1.240.0040.01115.74
7.1.230.0040.00415.49
7.1.220.0030.00915.34
7.1.210.0100.00615.35
7.1.200.0060.00315.31
7.1.190.0000.01215.56
7.1.180.0000.01215.44
7.1.170.0000.00915.32
7.1.160.0030.00915.50
7.1.150.0070.00315.45
7.1.140.0030.01015.61
7.1.130.0000.01515.50
7.1.120.0000.01415.66
7.1.110.0070.00715.55
7.1.100.0220.00216.66
7.1.90.0100.00315.76
7.1.80.0060.00315.33
7.1.70.0050.00616.30
7.1.60.0060.01117.64
7.1.50.0110.00516.11
7.1.40.0040.01115.32
7.1.30.0030.01215.42
7.1.20.0100.00715.79
7.1.10.0040.00815.50
7.1.00.0030.04218.83
7.0.330.0080.00314.94
7.0.320.0030.01314.93
7.0.310.0070.00315.22
7.0.300.0060.00615.24
7.0.290.0040.00815.42
7.0.280.0040.00415.42
7.0.270.0060.00315.27
7.0.260.0070.00715.28
7.0.250.0060.00615.30
7.0.240.0030.00915.08
7.0.230.0090.00614.93
7.0.220.0070.00715.07
7.0.210.0030.00715.24
7.0.200.0060.00815.92
7.0.190.0060.00915.30
7.0.180.0150.00015.19
7.0.170.0030.00615.20
7.0.160.0070.01015.29
7.0.150.0000.01415.05
7.0.140.0080.03518.68
7.0.130.0060.00315.07
7.0.120.0040.00415.22
7.0.110.0030.01015.20
7.0.100.0100.02517.65
7.0.90.0050.04717.70
7.0.80.0100.04017.67
7.0.70.0040.04917.64
7.0.60.0080.04317.44
7.0.50.0060.04617.76
7.0.40.0090.04316.72
7.0.30.0070.04516.71
7.0.20.0060.03916.73
7.0.10.0130.03516.60
7.0.00.0050.04516.78
5.6.400.0090.00414.42
5.6.390.0080.00514.23
5.6.380.0070.00714.20
5.6.370.0030.00714.46
5.6.360.0070.00314.35
5.6.350.0000.01014.36
5.6.340.0040.00814.21
5.6.330.0080.00414.13
5.6.320.0030.01014.21
5.6.310.0060.00914.09
5.6.300.0030.01214.27
5.6.290.0080.00414.27
5.6.280.0050.04017.37
5.6.270.0120.00414.08
5.6.260.0030.00613.95
5.6.250.0080.04317.50
5.6.240.0080.02717.54
5.6.230.0100.04317.32
5.6.220.0060.04517.37
5.6.210.0130.04117.25
5.6.200.0110.02417.60
5.6.190.0070.02317.63
5.6.180.0100.03917.44
5.6.170.0140.03717.48
5.6.160.0070.04317.52
5.6.150.0050.02717.60
5.6.140.0080.04117.76
5.6.130.0120.04317.73
5.6.120.0020.03617.46
5.6.110.0110.03517.65
5.6.100.0050.04217.60
5.6.90.0120.04017.45
5.6.80.0100.02917.24
5.6.70.0070.03117.33
5.6.60.0060.03817.25
5.6.50.0090.03217.09
5.6.40.0030.03217.14
5.6.30.0050.02617.14
5.6.20.0050.02317.04
5.6.10.0050.02317.29
5.6.00.0020.02917.28
5.5.380.0120.03917.33
5.5.370.0070.04317.24
5.5.360.0110.04617.31
5.5.350.0050.04617.38
5.5.340.0070.04217.68
5.5.330.0120.04017.36
5.5.320.0080.03017.54
5.5.310.0050.03117.63
5.5.300.0070.04317.44
5.5.290.0100.02817.44
5.5.280.0030.04517.60
5.5.270.0050.03117.35
5.5.260.0050.02817.54
5.5.250.0100.04317.19
5.5.240.0030.05017.13
5.5.230.0090.04417.10
5.5.220.0080.04216.98
5.5.210.0080.02817.04
5.5.200.0030.04517.08
5.5.190.0030.02417.10
5.5.180.0050.02517.13
5.5.170.0040.01114.03
5.5.160.0050.02617.11
5.5.150.0070.02517.07
5.5.140.0070.02216.84
5.5.130.0060.02117.08
5.5.120.0050.02816.98
5.5.110.0050.02316.95
5.5.100.0020.02816.90
5.5.90.0050.04217.04
5.5.80.0060.02117.09
5.5.70.0050.02317.04
5.5.60.0050.02416.96
5.5.50.0050.01917.12
5.5.40.0040.02716.97
5.5.30.0080.01817.07
5.5.20.0030.03016.85
5.5.10.0070.02217.12
5.5.00.0110.02416.85
5.4.450.0110.03815.06
5.4.440.0050.04515.08
5.4.430.0050.04315.14
5.4.420.0040.04415.31
5.4.410.0150.03215.04
5.4.400.0100.03814.96
5.4.390.0060.02614.99
5.4.380.0040.04414.92
5.4.370.0080.04114.96
5.4.360.0100.03814.96
5.4.350.0030.03014.93
5.4.340.0030.02314.96
5.4.330.0030.01010.92
5.4.320.0020.02614.98
5.4.310.0030.02714.92
5.4.300.0020.02614.95
5.4.290.0050.02114.95
5.4.280.0050.01815.01
5.4.270.0020.02214.94
5.4.260.0020.02815.00
5.4.250.0050.02115.07
5.4.240.0050.02514.99
5.4.230.0050.02715.00
5.4.220.0030.02714.85
5.4.210.0080.01714.92
5.4.200.0020.02514.92
5.4.190.0070.02115.03
5.4.180.0050.02014.99
5.4.170.0050.02014.94
5.4.160.0040.02014.91
5.4.150.0040.02014.80
5.4.140.0050.02013.64
5.4.130.0030.01813.50
5.4.120.0050.02213.64
5.4.110.0080.04613.58
5.4.100.0030.02313.58
5.4.90.0050.02213.54
5.4.80.0030.02013.63
5.4.70.0020.02313.65
5.4.60.0030.02213.63
5.4.50.0060.02013.60
5.4.40.0050.02113.74
5.4.30.0060.02613.54
5.4.20.0020.02813.70
5.4.10.0050.02213.63
5.4.00.0070.01913.31
5.3.290.0080.01712.75
5.3.280.0020.03312.74
5.3.270.0030.01812.67
5.3.260.0050.01812.71
5.3.250.0070.01812.66
5.3.240.0030.02212.72
5.3.230.0020.02212.73
5.3.220.0070.01612.72
5.3.210.0080.03012.72
5.3.200.0040.02312.65
5.3.190.0060.01812.68
5.3.180.0030.02012.72
5.3.170.0030.02212.72
5.3.160.0070.01812.70
5.3.150.0010.02512.68
5.3.140.0050.02112.67
5.3.130.0030.02712.71
5.3.120.0070.01812.65
5.3.110.0050.03112.71
5.3.100.0060.02212.45
5.3.90.0100.03312.38
5.3.80.0030.04312.38
5.3.70.0030.03512.44
5.3.60.0100.03512.33
5.3.50.0100.03412.41
5.3.40.0050.03212.41
5.3.30.0060.03612.39
5.3.20.0160.02512.28
5.3.10.0050.03912.25
5.3.00.0030.04012.26
5.2.170.0070.06012.40
5.2.160.0100.05712.40
5.2.150.0070.05712.40
5.2.140.0100.06012.40
5.2.130.0130.05712.40
5.2.120.0100.05712.40
5.2.110.0030.04312.40
5.2.100.0030.04712.40
5.2.90.0030.03712.40
5.2.80.0170.04712.40
5.2.70.0170.04712.40
5.2.60.0070.05712.40
5.2.50.0070.05012.40
5.2.40.0030.06312.40
5.2.30.0100.05712.40
5.2.20.0070.06012.40
5.2.10.0030.06312.40
5.2.00.0030.05312.40
5.1.60.0070.05312.40
5.1.50.0100.04712.40
5.1.40.0100.04712.40
5.1.30.0000.06312.40
5.1.20.0000.03012.40
5.1.10.0030.05712.40
5.1.00.0030.04712.40
5.0.50.0000.04312.40
5.0.40.0030.03712.40
5.0.30.0070.05012.40
5.0.20.0000.02012.40
5.0.10.0000.04012.40
5.0.00.0030.06012.40
4.4.90.0000.03312.40
4.4.80.0070.01712.40
4.4.70.0030.02712.40
4.4.60.0030.03012.40
4.4.50.0030.03712.40
4.4.40.0000.04312.40
4.4.30.0000.02712.40
4.4.20.0030.03312.40
4.4.10.0030.01712.40
4.4.00.0030.02312.40
4.3.110.0000.03012.40
4.3.100.0030.03312.40
4.3.90.0030.03012.40
4.3.80.0030.04312.40
4.3.70.0000.02012.40
4.3.60.0030.03312.40
4.3.50.0070.03312.40
4.3.40.0070.04012.40
4.3.30.0070.01712.40
4.3.20.0000.04012.40
4.3.10.0000.03012.40
4.3.00.0000.03712.40

preferences:
66.17 ms | 401 KiB | 5 Q