3v4l.org

run code in 300+ PHP versions simultaneously
<? $defaultdata = array( "showpassword"=>"no", "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);

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.01018.18
8.3.50.0080.01222.04
8.3.40.0060.01018.86
8.3.30.0070.00718.96
8.3.20.0070.00020.21
8.3.10.0040.00423.48
8.3.00.0080.00019.25
8.2.180.0150.00616.50
8.2.170.0090.00622.96
8.2.160.0130.00020.52
8.2.150.0110.00324.18
8.2.140.0200.00024.66
8.2.130.0060.00326.16
8.2.120.0050.00321.98
8.2.110.0060.00322.26
8.2.100.0000.01217.50
8.2.90.0000.00719.28
8.2.80.0000.00817.97
8.2.70.0050.00317.50
8.2.60.0080.00017.90
8.2.50.0060.00318.07
8.2.40.0030.00619.95
8.2.30.0060.00317.83
8.2.20.0000.00717.50
8.2.10.0000.00817.91
8.2.00.0030.00517.58
8.1.280.0040.01125.92
8.1.270.0000.00923.81
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0000.00823.92
8.1.230.0110.00019.01
8.1.220.0040.00417.74
8.1.210.0030.00618.77
8.1.200.0040.00417.10
8.1.190.0000.00817.10
8.1.180.0080.00018.10
8.1.170.0080.00018.61
8.1.160.0000.00721.93
8.1.150.0050.00218.79
8.1.140.0020.00517.22
8.1.130.0000.00717.70
8.1.120.0070.00017.36
8.1.110.0070.00017.21
8.1.100.0050.00317.37
8.1.90.0040.00417.36
8.1.80.0070.00017.36
8.1.70.0030.00517.29
8.1.60.0040.00417.33
8.1.50.0050.00317.41
8.1.40.0070.00017.33
8.1.30.0040.00417.53
8.1.20.0000.00917.46
8.1.10.0070.00017.44
8.1.00.0040.00417.38
8.0.300.0000.00818.77
8.0.290.0000.00716.63
8.0.280.0030.00318.37
8.0.270.0030.00317.17
8.0.260.0030.00317.18
8.0.250.0000.00716.79
8.0.240.0000.00716.82
8.0.230.0000.00716.84
8.0.220.0030.00316.75
8.0.210.0030.00316.81
8.0.200.0050.00316.80
8.0.190.0040.00416.70
8.0.180.0030.00716.77
8.0.170.0030.00516.67
8.0.160.0000.00716.81
8.0.150.0000.00816.82
8.0.140.0000.00716.59
8.0.130.0030.00313.41
8.0.120.0070.00016.74
8.0.110.0030.00316.70
8.0.100.0040.00416.75
8.0.90.0000.00716.79
8.0.80.0070.01016.66
8.0.70.0040.00416.55
8.0.60.0040.00416.69
8.0.50.0000.00716.59
8.0.30.0090.01117.00
8.0.20.0110.00817.40
8.0.10.0000.00716.74
8.0.00.0080.00816.60
7.4.330.0030.00315.02
7.4.320.0040.00416.22
7.4.300.0030.00316.37
7.4.290.0040.00416.43
7.4.280.0040.00416.36
7.4.270.0040.00416.51
7.4.260.0070.00016.48
7.4.250.0080.00016.44
7.4.240.0050.00216.41
7.4.230.0030.00316.37
7.4.220.0130.00616.47
7.4.210.0080.01116.39
7.4.200.0070.00016.29
7.4.160.0060.00916.08
7.4.150.0130.00917.40
7.4.140.0090.00817.86
7.4.130.0080.01216.47
7.4.120.0100.00716.37
7.4.110.0100.00616.16
7.4.100.0030.01416.45
7.4.90.0100.00716.37
7.4.80.0110.01219.39
7.4.70.0080.00816.50
7.4.60.0090.00616.57
7.4.50.0070.00016.57
7.4.40.0040.01216.47
7.4.30.0060.00916.31
7.4.00.0090.00614.86
7.3.330.0060.00013.34
7.3.320.0030.00313.34
7.3.310.0040.00416.06
7.3.300.0070.00016.09
7.3.290.0070.00816.18
7.3.280.0090.00716.15
7.3.270.0070.01617.40
7.3.260.0030.01316.09
7.3.250.0080.00916.39
7.3.240.0120.00916.10
7.3.230.0000.01716.40
7.3.210.0040.01816.24
7.3.200.0120.01019.39
7.3.190.0130.01016.12
7.3.180.0130.00316.29
7.3.170.0090.00616.27
7.3.160.0100.00616.23
7.2.330.0120.00816.54
7.2.320.0130.00716.49
7.2.310.0130.01016.43
7.2.300.0100.00716.56
7.2.290.0070.01316.32
7.2.00.0060.00619.38
7.1.100.0030.00818.02
7.1.70.0070.00317.09
7.1.60.0140.01019.32
7.1.50.0090.01617.01
7.1.00.0100.07022.27
7.0.200.0030.00316.68
7.0.140.0070.07022.10
7.0.90.0470.07720.10
7.0.80.0570.08019.95
7.0.70.0470.04320.05
7.0.60.0500.05720.01
7.0.50.0470.07020.36
7.0.40.0130.07320.10
7.0.30.0030.04319.96
7.0.20.0130.07720.02
7.0.10.0200.03020.07
7.0.00.0100.04320.17
5.6.280.0000.07721.08
5.6.240.0030.05320.68
5.6.230.0170.07320.70
5.6.220.0100.05020.49
5.6.210.0130.03320.57
5.6.200.0130.06321.10
5.6.190.0170.07320.97
5.6.180.0030.05021.14
5.6.170.0070.04021.12
5.6.160.0100.08020.97
5.6.150.0070.05720.95
5.6.140.0070.08321.14
5.6.130.0070.08321.09
5.6.120.0070.08720.96
5.6.110.0130.05321.09
5.6.100.0170.07321.18
5.6.90.0070.05021.03
5.6.80.0100.05320.53
5.6.70.0070.06320.50
5.6.60.0130.07020.41
5.6.50.0100.08020.47
5.6.40.0130.06720.39
5.6.30.0030.08320.37
5.6.20.0070.07320.47
5.6.10.0070.07720.53
5.6.00.0130.04020.33
5.5.380.0130.07720.39
5.5.370.0100.07720.43
5.5.360.0070.08320.38
5.5.350.0100.04720.43
5.5.340.0170.03720.79
5.5.330.0000.07020.93
5.5.320.0030.06720.88
5.5.310.0130.05720.84
5.5.300.0100.06720.79
5.5.290.0100.08320.81
5.5.280.0130.07720.88
5.5.270.0200.07720.64
5.5.260.0130.08020.92
5.5.250.0070.07020.55
5.5.240.0130.05320.16
5.5.230.0070.07720.32
5.5.220.0100.07020.21
5.5.210.0070.08020.32
5.5.200.0130.07020.24
5.5.190.0100.07320.09
5.5.180.0030.05320.28
5.5.160.0070.06720.22
5.5.150.0070.08320.25
5.5.140.0130.07320.25
5.5.130.0130.03720.25
5.5.120.0230.05720.23
5.5.110.0030.08320.28
5.5.100.0030.06320.13
5.5.90.0170.06719.96
5.5.80.0100.05320.08
5.5.70.0130.07720.16
5.5.60.0200.06720.09
5.5.50.0030.06020.10
5.5.40.0070.05320.09
5.5.30.0100.06020.07
5.5.20.0030.05020.06
5.5.10.0130.06720.10
5.5.00.0030.08720.03
5.4.450.0100.07719.37
5.4.440.0100.08019.45
5.4.430.0070.08019.34
5.4.420.0000.05319.41
5.4.410.0100.07719.38
5.4.400.0030.04318.86
5.4.390.0030.05318.90
5.4.380.0070.06318.85
5.4.370.0200.04019.12
5.4.360.0030.08319.15
5.4.350.0170.06718.91
5.4.340.0070.08019.18
5.4.320.0030.08019.18
5.4.310.0070.05019.13
5.4.300.0000.08019.09
5.4.290.0170.06018.88
5.4.280.0170.06719.21
5.4.270.0030.06719.16
5.4.260.0100.05019.18
5.4.250.0070.07319.03
5.4.240.0100.06319.04
5.4.230.0070.07019.02
5.4.220.0170.06319.04
5.4.210.0100.05719.11
5.4.200.0230.05718.98
5.4.190.0100.04318.89
5.4.180.0130.07319.20
5.4.170.0070.07319.20
5.4.160.0100.07019.21
5.4.150.0070.04319.02
5.4.140.0130.07016.35
5.4.130.0070.07016.43
5.4.120.0070.07316.39
5.4.110.0100.06716.45
5.4.100.0070.07316.49
5.4.90.0030.04316.56
5.4.80.0000.05316.55
5.4.70.0100.07016.40
5.4.60.0100.07016.30
5.4.50.0070.07016.40
5.4.40.0100.03316.41
5.4.30.0170.06016.36
5.4.20.0030.05016.44
5.4.10.0070.07716.24
5.4.00.0130.06715.83
5.3.290.0130.07314.64
5.3.280.0030.08014.55
5.3.270.0100.06714.55
5.3.260.0000.04314.42
5.3.250.0070.03714.46
5.3.240.0070.07714.59
5.3.230.0070.07714.52
5.3.220.0170.05014.54
5.3.210.0130.06714.55
5.3.200.0100.04714.47
5.3.190.0070.06714.50
5.3.180.0100.06714.56
5.3.170.0070.07714.54
5.3.160.0130.06014.52
5.3.150.0070.04714.52
5.3.140.0100.05014.46
5.3.130.0130.06714.53
5.3.120.0000.07014.49
5.3.110.0130.07714.39
5.3.100.0030.05714.01
5.3.90.0170.06013.93
5.3.80.0070.04313.99
5.3.70.0070.07313.99
5.3.60.0070.07713.81
5.3.50.0230.06013.79
5.3.40.0100.05713.85
5.3.30.0100.06713.67
5.3.20.0070.04713.44
5.3.10.0100.04713.60
5.3.00.0070.07713.54
5.2.170.0070.06010.97
5.2.160.0000.06311.13
5.2.150.0070.06310.95
5.2.140.0070.06310.95
5.2.130.0000.05311.09
5.2.120.0130.05310.93
5.2.110.0000.03711.01
5.2.100.0030.06710.93
5.2.90.0000.06010.92
5.2.80.0000.03311.11
5.2.70.0100.02711.16
5.2.60.0030.06311.10
5.2.50.0100.05710.87
5.2.40.0070.04710.95
5.2.30.0070.03310.93
5.2.20.0070.06311.02
5.2.10.0070.05310.88
5.2.00.0070.03310.75
5.1.60.0000.05010.03
5.1.50.0000.06010.00
5.1.40.0000.05710.00
5.1.30.0070.04310.36
5.1.20.0030.02710.39
5.1.10.0000.06010.08
5.1.00.0100.04710.07
5.0.50.0070.0438.38
5.0.40.0030.0178.28
5.0.30.0030.0638.26
5.0.20.0070.0408.09
5.0.10.0030.0478.00
5.0.00.0100.0578.25
4.4.90.0030.0137.32
4.4.80.0030.0337.32
4.4.70.0100.0307.32
4.4.60.0000.0377.32
4.4.50.0030.0307.32
4.4.40.0030.0237.32
4.4.30.0070.0307.32
4.4.20.0030.0307.32
4.4.10.0030.0337.32
4.4.00.0000.0377.32
4.3.110.0030.0377.32
4.3.100.0030.0437.32
4.3.90.0030.0177.32
4.3.80.0030.0377.32
4.3.70.0000.0377.32
4.3.60.0100.0277.32
4.3.50.0000.0337.32
4.3.40.0000.0507.32
4.3.30.0030.0377.32
4.3.20.0030.0377.32
4.3.10.0000.0377.32
4.3.00.0000.0377.32

preferences:
31.28 ms | 401 KiB | 5 Q