3v4l.org

run code in 300+ PHP versions simultaneously
<?php 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)))); } //INput should be this: $_COOKIE["data"] //data=ClVLIh4ASCsCBE8lAxMacFMZV2hdVVotEhhUJQNVAmhSEV5%2FRBFeaAw%3D function decrypt_to_string($d){ echo "\nDECRYPT $d 2 Strangggg\n"; $tempdata = json_decode(xor_encrypt(base64_decode($d)), true); echo "Var Dumping tempdata!\n"; var_dump( $tempdata ); echo "\n"; echo "BEFOREJSON\n".xor_encrypt(base64_decode($d))."\n"; } //////////////////////////////////////////////////////////////////////////////// $defaultdata = array( "showpassword"=>"no", "bgcolor"=>"#ffffff"); $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); $kai = "ClVLIh4ASCsCBE8lAxMacFMZV2hdVVotEhhUJQNVAmhSEV5%2FRBFeaAw%3D"; $kai = urldecode($kai); decrypt_to_string($kai); $defaultdataX = array( "showpassword"=>"yes", "bgcolor"=>"#ffffff"); $pimping = base64_encode(xor_encrypt(json_encode($defaultdataX))); echo "\n~ ~ ~~ ~ ~~ \n"; echo $pimping; echo "\n~ ~ ~~ ~ ~~ \n"; //////////////////////////////////////////////////////////////////////////////// echo "\n\n!!!";

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.0160.00318.30
8.3.50.0110.00318.10
8.3.40.0040.01118.68
8.3.30.0070.00718.48
8.3.20.0170.00019.46
8.3.10.0040.00421.82
8.3.00.0080.00019.80
8.2.180.0040.01118.41
8.2.170.0140.00722.96
8.2.160.0100.00318.91
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0040.00420.51
8.2.120.0050.00326.35
8.2.110.0030.00622.44
8.2.100.0090.00317.71
8.2.90.0000.00919.36
8.2.80.0040.00417.97
8.2.70.0060.00317.50
8.2.60.0040.00418.03
8.2.50.0000.00818.10
8.2.40.0070.00020.59
8.2.30.0040.00419.32
8.2.20.0040.00418.03
8.2.10.0050.00318.09
8.2.00.0000.00718.38
8.1.280.0090.00925.92
8.1.270.0040.00422.18
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0090.00023.92
8.1.230.0100.00324.03
8.1.220.0080.00017.74
8.1.210.0050.00318.77
8.1.200.0060.00317.23
8.1.190.0060.00317.23
8.1.180.0050.00318.10
8.1.170.0000.00818.50
8.1.160.0030.00318.82
8.1.150.0040.00420.15
8.1.140.0050.00219.48
8.1.130.0070.00018.91
8.1.120.0040.00417.46
8.1.110.0040.00417.32
8.1.100.0000.00717.52
8.1.90.0050.00317.41
8.1.80.0080.00017.37
8.1.70.0050.00217.46
8.1.60.0000.00817.60
8.1.50.0050.00317.41
8.1.40.0000.00717.52
8.1.30.0000.00817.69
8.1.20.0030.00517.64
8.1.10.0040.00417.54
8.1.00.0070.00017.53
8.0.300.0000.00718.77
8.0.290.0070.00016.63
8.0.280.0000.00718.55
8.0.270.0000.00717.20
8.0.260.0030.00318.91
8.0.250.0000.00716.87
8.0.240.0030.00416.96
8.0.230.0080.00016.97
8.0.220.0020.00516.88
8.0.210.0000.00716.93
8.0.200.0030.00316.99
8.0.190.0050.00317.04
8.0.180.0000.00716.94
8.0.170.0040.00416.87
8.0.160.0000.00716.95
8.0.150.0040.00416.84
8.0.140.0050.00316.88
8.0.130.0040.00413.32
8.0.120.0030.00516.90
8.0.110.0000.00717.03
8.0.100.0000.00717.01
8.0.90.0000.00716.78
8.0.80.0070.01016.89
8.0.70.0040.00416.80
8.0.60.0000.00816.77
8.0.50.0020.00516.94
8.0.30.0070.01017.00
8.0.20.0150.00717.40
8.0.10.0040.00416.89
8.0.00.0130.00716.85
7.4.330.0000.00615.55
7.4.320.0000.00716.63
7.4.300.0030.00316.53
7.4.290.0030.00716.54
7.4.280.0060.00316.45
7.4.270.0050.00216.65
7.4.260.0000.00816.65
7.4.250.0070.00016.58
7.4.240.0040.00416.55
7.4.230.0000.00716.38
7.4.220.0130.00616.75
7.4.210.0090.00616.59
7.4.200.0030.00316.56
7.4.160.0080.01116.53
7.4.150.0090.01317.40
7.4.140.0120.00617.86
7.4.130.0090.01516.59
7.4.120.0110.01116.59
7.4.110.0080.01316.48
7.4.100.0080.01116.66
7.4.90.0120.00616.52
7.4.80.0120.01219.39
7.4.70.0040.01416.49
7.4.60.0090.01016.36
7.4.50.0130.00016.27
7.4.40.0070.01016.48
7.4.30.0080.00816.37
7.4.00.0040.01115.16
7.3.330.0000.00513.35
7.3.320.0000.00613.39
7.3.310.0020.00516.28
7.3.300.0030.00316.35
7.3.290.0080.00816.39
7.3.280.0100.00916.37
7.3.270.0080.00817.40
7.3.260.0050.01416.52
7.3.250.0120.00816.53
7.3.240.0160.00416.66
7.3.230.0090.00916.31
7.3.210.0090.00916.49
7.3.200.0140.00616.73
7.3.190.0100.00716.47
7.3.180.0130.00616.66
7.3.170.0100.00616.52
7.3.160.0100.00716.61
7.3.10.0130.00316.62
7.3.00.0120.00316.77
7.2.330.0140.00516.80
7.2.320.0080.01916.84
7.2.310.0100.00616.83
7.2.300.0030.01316.77
7.2.290.0120.00616.98
7.2.130.0120.00316.88
7.2.120.0070.00716.82
7.2.110.0060.00316.68
7.2.100.0070.00417.08
7.2.90.0060.01016.90
7.2.80.0000.01016.69
7.2.70.0060.00716.76
7.2.60.0060.00817.08
7.2.50.0110.00016.98
7.2.40.0040.01416.95
7.2.30.0040.01217.04
7.2.20.0080.00816.96
7.2.10.0030.00716.76
7.2.00.0070.01117.17
7.1.250.0110.00015.77
7.1.200.0000.01115.54
7.1.70.0110.00417.16
7.1.60.0000.01017.27
7.1.50.0130.01334.46
7.1.40.0130.01334.36
7.1.30.0130.01734.34
7.1.20.0130.01334.70
7.1.10.0100.00716.43
7.1.00.0030.00716.45
7.0.200.0060.00916.84
7.0.190.0030.00716.60
7.0.180.0030.01016.13
7.0.170.0000.01016.17
7.0.160.0030.01016.34
7.0.150.0030.01316.23
7.0.140.0030.00716.29
7.0.130.0030.00716.55
7.0.120.0000.01016.55
7.0.110.0000.01316.01
7.0.100.0000.01316.23
7.0.90.0030.01016.14
7.0.80.0000.01016.21
7.0.70.0030.01016.35
7.0.60.0070.00716.06
7.0.50.0070.00316.03
7.0.40.0030.00716.31
7.0.30.0000.01016.30
7.0.20.0000.01016.29
7.0.10.0030.00716.32
7.0.00.0100.00316.21

preferences:
60.9 ms | 400 KiB | 5 Q