3v4l.org

run code in 300+ PHP versions simultaneously
<?php $defaultdata = json_encode(array( "showpassword"=>"yes", "bgcolor"=>"#ffffff")); function xor_decrypt($in) { if ($in != ''){ $text = $in; $key = json_encode(array( "showpassword"=>"no", "bgcolor"=>"#ffffff"));} else{ $text = json_encode(array( "showpassword"=>"yes", "bgcolor"=>"#ffffff")); $key = "qw8J";} // Iterate through each character $outText = ''; for($i=0;$i<strlen($text);$i++) { $outText .= $text[$i] ^ $key[$i % strlen($key)]; } return $outText; } print "Key is currently unknown.\n OriginalData ^ Key = CipherText\n\t"; print " so that also means,\n OriginalData ^ Ciphertext = Key\n Therefore the key will repeat itself: "; print xor_decrypt(base64_decode("HmYkBwozJw4WNyAAFyB1VUcqOE1JZjUIBis7ABdmbU1GIjEJAyIxTRg=")); print "\nNow that we know the key lets create a new cookie to display the password: \n"; print base64_encode(xor_decrypt("")); print "\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.4.20.0380.01017.41
8.4.10.0370.01117.32
8.3.150.0300.01116.39
8.3.140.0320.00116.39
8.3.130.0260.01416.33
8.3.120.0320.00816.43
8.3.110.0290.01116.37
8.3.100.0400.00616.46
8.3.90.0360.01016.24
8.3.80.0390.00716.40
8.3.70.0360.01216.35
8.3.60.0350.00916.49
8.3.50.0310.01416.48
8.3.40.0320.00517.39
8.3.30.0200.01117.44
8.3.20.0170.01017.35
8.3.10.0310.00517.57
8.3.00.0150.00717.55
8.2.270.0350.00316.74
8.2.260.0330.00616.42
8.2.250.0280.01016.54
8.2.240.0290.01016.46
8.2.230.0290.00916.38
8.2.220.0330.00516.56
8.2.210.0340.00516.46
8.2.200.0330.00616.54
8.2.190.0310.00716.41
8.2.180.0300.00716.52
8.2.170.0350.00517.76
8.2.160.0310.01017.52
8.2.150.0280.01117.54
8.2.140.0240.00917.51
8.2.130.0350.00517.46
8.2.120.0220.01017.62
8.2.110.0290.01117.54
8.2.100.0280.00817.58
8.2.90.0250.00917.47
8.2.80.0320.00517.46
8.2.70.0330.00317.47
8.2.60.0390.00417.37
8.2.50.0350.00517.34
8.2.40.0260.00917.61
8.2.30.0270.00917.60
8.2.20.0250.00817.37
8.2.10.0310.00617.57
8.2.00.0270.00817.42

preferences:
30.94 ms | 403 KiB | 5 Q