3v4l.org

run code in 300+ PHP versions simultaneously
<html> <head> <!-- This stuff in the header has nothing to do with the level --> <link rel="stylesheet" type="text/css" href="http://natas.labs.overthewire.org/css/level.css"> <link rel="stylesheet" href="http://natas.labs.overthewire.org/css/jquery-ui.css" /> <link rel="stylesheet" href="http://natas.labs.overthewire.org/css/wechall.css" /> <script src="http://natas.labs.overthewire.org/js/jquery-1.9.1.js"></script> <script src="http://natas.labs.overthewire.org/js/jquery-ui.js"></script> <script src=http://natas.labs.overthewire.org/js/wechall-data.js></script><script src="http://natas.labs.overthewire.org/js/wechall.js"></script> <script>var wechallinfo = { "level": "natas11", "pass": "<censored>" };</script></head> <? $defaultdata = array( "showpassword"=>"yes", "bgcolor"=>"#ffffff"); function xor_encrypt($in) { $key = '<censored>'; $text = $in; $outText = ''; // Iterate through each character for($i=0;$i<strlen($text);$i++) { $outText .= $text[$i] ^ $key[$i % strlen($key)]; } return $outText; } function loadData($def) { global $_COOKIE; $mydata = $def; if(array_key_exists("data", $_COOKIE)) { $tempdata = json_decode(xor_encrypt(base64_decode($_COOKIE["data"])), true); if(is_array($tempdata) && array_key_exists("showpassword", $tempdata) && array_key_exists("bgcolor", $tempdata)) { if (preg_match('/^#(?:[a-f\d]{6})$/i', $tempdata['bgcolor'])) { $mydata['showpassword'] = $tempdata['showpassword']; $mydata['bgcolor'] = $tempdata['bgcolor']; } } } return $mydata; } function saveData($d) { setcookie("data", base64_encode(xor_encrypt(json_encode($d)))); } $data = loadData($defaultdata); if(array_key_exists("bgcolor",$_REQUEST)) { if (preg_match('/^#(?:[a-f\d]{6})$/i', $_REQUEST['bgcolor'])) { $data['bgcolor'] = $_REQUEST['bgcolor']; } } saveData($data); ?> <h1>natas11</h1> <div id="content"> <body style="background: <?=$data['bgcolor']?>;"> Cookies are protected with XOR encryption<br/><br/> <? if($data["showpassword"] == "yes") { print "The password for natas12 is <censored><br>"; } ?> <form> Background color: <input name=bgcolor value="<?=$data['bgcolor']?>"> <input type=submit value="Set color"> </form> <div id="viewsource"><a href="index-source.html">View sourcecode</a></div> </div> </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.0140.00318.43
8.3.50.0300.00821.08
8.3.40.0150.00618.82
8.3.30.0070.00720.35
8.3.20.0040.00420.66
8.3.10.0080.00021.14
8.3.00.0040.00423.51
8.2.180.0110.01116.63
8.2.170.0090.00622.96
8.2.160.0100.00320.53
8.2.150.0000.00824.18
8.2.140.0050.00224.66
8.2.130.0000.00726.16
8.2.120.0080.00021.05
8.2.110.0000.00920.51
8.2.100.0090.00317.84
8.2.90.0040.00419.21
8.2.80.0050.00219.25
8.2.70.0060.00317.63
8.2.60.0000.00917.93
8.2.50.0000.00818.07
8.2.40.0000.00818.22
8.2.30.0040.00419.38
8.2.20.0080.00017.71
8.2.10.0070.00017.56
8.2.00.0000.00717.55
8.1.280.0070.01425.92
8.1.270.0030.00523.99
8.1.260.0030.00626.35
8.1.250.0000.00728.09
8.1.240.0030.00622.48
8.1.230.0040.00720.85
8.1.220.0040.00418.77
8.1.210.0040.00418.90
8.1.200.0060.00317.22
8.1.190.0030.00617.40
8.1.180.0030.00618.10
8.1.170.0040.00418.56
8.1.160.0020.00518.71
8.1.150.0040.00418.52
8.1.140.0080.00017.25
8.1.130.0040.00417.82
8.1.120.0070.00017.28
8.1.110.0040.00417.34
8.1.100.0030.00517.34
8.1.90.0070.00017.32
8.1.80.0000.00717.23
8.1.70.0030.00317.29
8.1.60.0050.00317.46
8.1.50.0070.00017.40
8.1.40.0040.00417.43
8.1.30.0040.00417.35
8.1.20.0000.00817.53
8.1.10.0000.00817.56
8.1.00.0040.00417.49
8.0.300.0080.00019.85
8.0.290.0050.00217.18
8.0.280.0030.00318.29
8.0.270.0000.00817.23
8.0.260.0000.00616.82
8.0.250.0080.00016.99
8.0.240.0000.00716.78
8.0.230.0040.00316.93
8.0.220.0000.00716.79
8.0.210.0040.00416.80
8.0.200.0040.00416.75
8.0.190.0000.00716.89
8.0.180.0030.00516.79
8.0.170.0000.00716.87
8.0.160.0040.00416.88
8.0.150.0000.00716.76
8.0.140.0000.01116.80
8.0.130.0000.00613.43
8.0.120.0030.00516.82
8.0.110.0070.00316.68
8.0.100.0040.00416.61
8.0.90.0080.00016.89
8.0.80.0090.00616.80
8.0.70.0000.00816.77
8.0.60.0040.00416.95
8.0.50.0080.00016.83
8.0.30.0070.01317.08
8.0.20.0140.00617.40
8.0.10.0000.00717.04
8.0.00.0140.01316.72
7.4.330.0000.00516.71
7.4.320.0030.00316.46
7.4.300.0060.00016.52
7.4.290.0000.00716.28
7.4.280.0030.00316.31
7.4.270.0000.00716.46
7.4.260.0050.00013.32
7.4.250.0050.00316.39
7.4.240.0070.00016.27
7.4.230.0000.00716.54
7.4.220.0100.01616.38
7.4.210.0090.00516.41
7.4.200.0070.00016.58
7.4.190.0000.00716.52
7.4.160.0000.01516.35
7.4.150.0100.00717.40
7.4.140.0090.00917.86
7.4.130.0090.00916.46
7.4.120.0130.00416.34
7.4.110.0090.00816.11
7.4.100.0090.00916.62
7.4.90.0040.01916.65
7.4.80.0120.00619.39
7.4.70.0030.01516.25
7.4.60.0100.00616.44
7.4.50.0060.00316.57
7.4.40.0070.00722.77
7.4.30.0140.00716.52
7.4.00.0080.00914.87
7.3.330.0020.00213.43
7.3.320.0050.00013.32
7.3.310.0000.00716.26
7.3.300.0000.00716.18
7.3.290.0060.01016.33
7.3.280.0060.01316.28
7.3.270.0130.01017.40
7.3.260.0120.01118.24
7.3.250.0140.00316.51
7.3.240.0160.00616.23
7.3.230.0070.00916.49
7.3.210.0090.00916.26
7.3.200.0160.00619.39
7.3.190.0120.00916.30
7.3.180.0030.01216.44
7.3.170.0060.00916.31
7.3.160.0130.00516.14
7.3.120.0080.00814.85
7.3.110.0040.01514.57
7.3.100.0080.01214.98
7.3.90.0030.01014.72
7.3.80.0090.00914.71
7.3.70.0060.01214.86
7.3.60.0040.01114.88
7.3.50.0030.01014.77
7.3.40.0030.00614.84
7.3.30.0080.00314.75
7.3.20.0060.00616.41
7.3.10.0000.01316.66
7.3.00.0090.00616.43
7.2.330.0050.01416.65
7.2.320.0160.00616.47
7.2.310.0120.00816.30
7.2.300.0100.00716.39
7.2.290.0120.00916.62
7.2.250.0070.01315.12
7.2.240.0090.00914.73
7.2.230.0000.01314.70
7.2.220.0000.01714.93
7.2.210.0060.01215.16
7.2.200.0030.01515.09
7.2.190.0070.01014.96
7.2.180.0100.00714.84
7.2.170.0060.00615.07
7.2.160.0040.00414.96
7.2.150.0080.00816.79
7.2.140.0030.01016.93
7.2.130.0000.01716.66
7.2.120.0030.01416.92
7.2.110.0070.01016.64
7.2.100.0030.01016.92
7.2.90.0070.00716.87
7.2.80.0030.01016.91
7.2.70.0030.00616.72
7.2.60.0020.01416.81
7.2.50.0070.00716.89
7.2.40.0070.00716.71
7.2.30.0090.01018.23
7.2.20.0050.01118.29
7.2.10.0050.01118.18
7.2.00.0050.01318.55
7.1.330.0060.01215.68
7.1.320.0070.00415.60
7.1.310.0100.00915.77
7.1.300.0030.01415.38
7.1.290.0060.00915.75
7.1.280.0080.00015.54
7.1.270.0100.00315.46
7.1.260.0070.00315.71
7.1.250.0070.00715.98
7.1.240.0070.00715.71
7.1.230.0000.01215.92
7.1.220.0040.00815.75
7.1.210.0040.01215.70
7.1.200.0020.00915.81
7.1.190.0030.01015.68
7.1.180.0030.01015.89
7.1.170.0060.01015.86
7.1.160.0000.01215.48
7.1.150.0060.01017.12
7.1.140.0060.01217.25
7.1.130.0100.00817.22
7.1.120.0040.01217.40
7.1.110.0050.01217.05
7.1.100.0060.01017.19
7.1.90.0080.01116.82
7.1.80.0040.01316.97
7.1.70.0040.00816.60
7.1.60.0140.01623.23
7.1.50.0120.01622.38
7.1.40.0150.01225.03
7.1.30.0180.01025.08
7.1.20.0150.01725.09
7.1.10.0050.01216.16
7.1.00.0080.02918.20
7.0.330.0030.00615.29
7.0.320.0110.00414.94
7.0.310.0070.00315.12
7.0.300.0060.00315.31
7.0.290.0140.00015.50
7.0.280.0050.00515.30
7.0.270.0080.01016.81
7.0.260.0090.01016.99
7.0.250.0100.00716.63
7.0.240.0060.01016.49
7.0.230.0080.00616.53
7.0.220.0070.00816.52
7.0.210.0120.00415.88
7.0.200.0050.01016.31
7.0.190.0050.01216.06
7.0.180.0080.00815.82
7.0.170.0080.00815.77
7.0.160.0050.01415.82
7.0.150.0090.00915.79
7.0.140.0050.02917.80
7.0.130.0050.01216.06
7.0.120.0070.01315.85
7.0.110.0080.01015.81
7.0.100.0070.00915.91
7.0.90.0160.02117.22
7.0.80.0150.02117.18
7.0.70.0210.03017.27
7.0.60.0220.02617.27
7.0.50.0190.02317.33
7.0.40.0060.03316.71
7.0.30.0040.03516.64
7.0.20.0050.03116.67
7.0.10.0080.02916.64
7.0.00.0080.02816.55
5.6.400.0030.00914.54
5.6.390.0090.00614.39
5.6.380.0080.00714.35
5.6.370.0060.00314.45
5.6.360.0040.00714.32
5.6.350.0000.00914.22
5.6.340.0070.00714.44
5.6.330.0050.00514.07
5.6.320.0030.00614.42
5.6.310.0040.00814.21
5.6.300.0120.03417.69
5.6.290.0150.04317.57
5.6.280.0110.05118.65
5.6.270.0110.04817.56
5.6.260.0130.03817.38
5.6.250.0130.04217.50
5.6.240.0070.03818.59
5.6.230.0130.04718.57
5.6.220.0140.04318.57
5.6.210.0140.05018.64
5.6.200.0120.05018.74
5.6.190.0090.05318.74
5.6.180.0140.05018.73
5.6.170.0140.04018.75
5.6.160.0140.03518.62
5.6.150.0130.05518.72
5.6.140.0090.04918.72
5.6.130.0090.04718.66
5.6.120.0120.05118.74
5.6.110.0090.04518.68
5.6.100.0090.03818.74
5.6.90.0080.05118.80
5.6.80.0100.05418.28
5.6.70.0140.05218.22
5.6.60.0080.05018.41
5.6.50.0100.03818.15
5.6.40.0130.04618.23
5.6.30.0130.05518.19
5.6.20.0140.04718.25
5.6.10.0090.04818.31
5.6.00.0110.05618.25
5.5.380.0120.05618.98
5.5.370.0090.06018.99
5.5.360.0130.07818.96
5.5.350.0150.07418.95
5.5.340.0160.06119.45
5.5.330.0150.07819.42
5.5.320.0150.08019.50
5.5.310.0120.06319.46
5.5.300.0080.08519.31
5.5.290.0070.07219.36
5.5.280.0100.07319.32
5.5.270.0110.06619.43
5.5.260.0130.07619.45
5.5.250.0160.06519.10
5.5.240.0120.06718.81
5.5.230.0160.07718.81
5.5.220.0150.07718.65
5.5.210.0150.07418.72
5.5.200.0110.06918.62
5.5.190.0210.07318.88
5.5.180.0110.06818.60
5.5.160.0080.08318.88
5.5.150.0160.06218.86
5.5.140.0130.07518.70
5.5.130.0100.06318.62
5.5.120.0130.06318.66
5.5.110.0130.07318.72
5.5.100.0120.06918.55
5.5.90.0130.07318.71
5.5.80.0120.05018.67
5.5.70.0160.07218.68
5.5.60.0080.05918.69
5.5.50.0120.06818.77
5.5.40.0100.06518.48
5.5.30.0120.06518.76
5.5.20.0110.06118.55
5.5.10.0120.07218.62
5.5.00.0140.07418.67
5.4.450.0190.07319.40
5.4.440.0110.05519.32
5.4.430.0120.07019.32
5.4.420.0120.07019.31
5.4.410.0170.06919.27
5.4.400.0130.06918.94
5.4.390.0160.07119.01
5.4.380.0110.06018.97
5.4.370.0110.07918.98
5.4.360.0130.07718.89
5.4.350.0160.06919.06
5.4.340.0100.06219.10
5.4.320.0140.05719.13
5.4.310.0160.05419.09
5.4.300.0100.06318.99
5.4.290.0090.05219.04
5.4.280.0130.07119.10
5.4.270.0120.06119.08
5.4.260.0120.06419.02
5.4.250.0080.06518.95
5.4.240.0130.04819.18
5.4.230.0110.07419.10
5.4.220.0100.07119.07
5.4.210.0090.05819.12
5.4.200.0080.06919.07
5.4.190.0110.06619.06
5.4.180.0120.06218.92
5.4.170.0150.07018.93
5.4.160.0190.05618.88
5.4.150.0120.06718.96
5.4.140.0120.05716.57
5.4.130.0100.05116.50
5.4.120.0090.06416.46
5.4.110.0170.05416.61
5.4.100.0140.06716.63
5.4.90.0100.06616.59
5.4.80.0100.07016.60
5.4.70.0160.06816.59
5.4.60.0100.05216.54
5.4.50.0130.05916.48
5.4.40.0140.06116.57
5.4.30.0120.06716.44
5.4.20.0070.07416.51
5.4.10.0120.06916.52
5.4.00.0120.05215.90
5.3.290.0080.08214.59
5.3.280.0090.06014.50
5.3.270.0100.07714.64
5.3.260.0130.06414.57
5.3.250.0090.07414.59
5.3.240.0120.07414.60
5.3.230.0090.06714.51
5.3.220.0120.07514.48
5.3.210.0120.07314.52
5.3.200.0080.06514.54
5.3.190.0140.05614.38
5.3.180.0160.05314.53
5.3.170.0100.06714.54
5.3.160.0110.05314.47
5.3.150.0120.06314.58
5.3.140.0170.05714.38
5.3.130.0100.05414.49
5.3.120.0130.05214.50
5.3.110.0100.06014.61
5.3.100.0100.07414.05
5.3.90.0090.05614.07
5.3.80.0080.05613.98
5.3.70.0110.05714.02
5.3.60.0100.05914.02
5.3.50.0120.06513.96
5.3.40.0110.05813.93
5.3.30.0130.04913.88
5.3.20.0150.04813.76
5.3.10.0090.05313.59
5.3.00.0060.06313.69
5.2.170.0070.05311.04
5.2.160.0080.04911.10
5.2.150.0120.04111.23
5.2.140.0170.03911.18
5.2.130.0100.03911.15
5.2.120.0060.05011.22
5.2.110.0090.05111.00
5.2.100.0070.05911.13
5.2.90.0060.04911.13
5.2.80.0110.05511.04
5.2.70.0090.06111.09
5.2.60.0070.05710.97
5.2.50.0120.05911.04
5.2.40.0130.05311.09
5.2.30.0120.05510.80
5.2.20.0080.05610.97
5.2.10.0060.04110.84
5.2.00.0120.04210.78
5.1.60.0050.0479.92
5.1.50.0090.0359.93
5.1.40.0070.04410.13
5.1.30.0090.04510.36
5.1.20.0080.04510.34
5.1.10.0110.03810.16
5.1.00.0080.05510.10
5.0.50.0110.0338.64
5.0.40.0100.0388.47
5.0.30.0070.0408.35
5.0.20.0130.0318.36
5.0.10.0070.0438.34
5.0.00.0040.0548.20
4.4.90.0050.0257.71
4.4.80.0060.0277.71
4.4.70.0050.0257.71
4.4.60.0040.0197.71
4.4.50.0030.0197.71
4.4.40.0040.0417.71
4.4.30.0030.0257.71
4.4.20.0040.0247.71
4.4.10.0090.0297.71
4.4.00.0030.0487.71
4.3.110.0020.0357.71
4.3.100.0030.0347.71
4.3.90.0020.0317.71
4.3.80.0080.0367.71
4.3.70.0050.0257.71
4.3.60.0040.0237.71
4.3.50.0040.0347.71
4.3.40.0040.0417.71
4.3.30.0050.0297.71
4.3.20.0030.0327.71
4.3.10.0020.0317.71
4.3.00.0060.0277.71

preferences:
44.04 ms | 401 KiB | 5 Q