3v4l.org

run code in 300+ PHP versions simultaneously
<?php $c1="ClVLIh4ASCsCBE8lAxMacFMZV2hdVVotEhhUJQNVAmhSFl4sFxJeaAw="; $c2="GkAQCQ0UEQMQEhUMEwZBW0ANDkBPQwAEAg0PDhBBW0BAUVJTUVJBHA=="; function xor_encrypt($in) { $key = 'abc'; $text = $in; $outText = ''; // Iterate through each character for($i=0;$i<strlen($text);$i++) { $outText .= $text[$i] ^ $key[$i % strlen($key)]; } return $outText; } $defdata = array( "showpassword"=>"no", "bgcolor"=>"#00000"); #decode $tmp= json_decode(xor_encrypt($c2), true); if (is_array($tmp)) { print $tmp['showpassword']; print $tmp['bgcolor']; } else print "Error!"; print " <> "; #encode print xor_encrypt(json_encode($defdata));

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.01418.56
8.3.50.0130.00521.99
8.3.40.0140.00018.84
8.3.30.0110.00718.71
8.3.20.0040.00420.16
8.3.10.0000.00723.66
8.3.00.0040.00419.13
8.2.180.0140.00716.75
8.2.170.0110.00422.96
8.2.160.0080.00520.39
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0120.00026.16
8.2.120.0050.00319.53
8.2.110.0030.00620.94
8.2.100.0090.00317.63
8.2.90.0040.00419.25
8.2.80.0050.00317.97
8.2.70.0030.00617.63
8.2.60.0040.00417.93
8.2.50.0040.00418.07
8.2.40.0050.00319.30
8.2.30.0040.00420.63
8.2.20.0050.00517.68
8.2.10.0080.00018.11
8.2.00.0000.00718.03
8.1.280.0130.00725.92
8.1.270.0080.00023.89
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0070.00323.92
8.1.230.0070.00419.13
8.1.220.0070.00017.74
8.1.210.0040.00418.77
8.1.200.0030.00617.48
8.1.190.0030.00617.13
8.1.180.0040.00418.10
8.1.170.0000.00718.71
8.1.160.0020.00522.07
8.1.150.0030.00618.84
8.1.140.0080.00019.50
8.1.130.0030.00317.64
8.1.120.0040.00417.39
8.1.110.0000.01017.38
8.1.100.0040.00417.29
8.1.90.0070.00017.43
8.1.80.0060.00317.29
8.1.70.0020.00517.33
8.1.60.0050.00317.57
8.1.50.0040.00417.42
8.1.40.0040.00717.42
8.1.30.0060.00317.59
8.1.20.0000.00717.59
8.1.10.0000.00817.47
8.1.00.0040.00417.42
8.0.300.0040.00418.77
8.0.290.0000.00716.63
8.0.280.0000.00718.30
8.0.270.0000.00717.27
8.0.260.0000.00617.18
8.0.250.0000.00717.00
8.0.240.0030.00316.95
8.0.230.0040.00416.98
8.0.220.0030.00616.90
8.0.210.0100.00016.78
8.0.200.0000.00616.95
8.0.190.0000.00916.93
8.0.180.0070.00016.82
8.0.170.0040.00416.88
8.0.160.0070.00016.75
8.0.150.0040.00416.73
8.0.140.0000.00816.73
8.0.130.0050.00013.26
8.0.120.0030.00616.75
8.0.110.0000.00816.80
8.0.100.0000.00816.95
8.0.90.0070.00016.83
8.0.80.0040.01116.96
8.0.70.0020.00516.73
8.0.60.0000.00716.77
8.0.50.0030.00516.81
8.0.30.0140.00317.08
8.0.20.0090.01017.40
8.0.10.0000.00816.87
8.0.00.0100.00616.82
7.4.330.0040.00415.08
7.4.320.0000.00616.35
7.4.300.0000.00616.61
7.4.290.0040.00416.50
7.4.280.0040.00416.59
7.4.270.0000.00716.53
7.4.260.0030.00316.61
7.4.250.0000.00816.61
7.4.240.0020.00516.55
7.4.230.0000.00716.26
7.4.220.0070.01316.71
7.4.210.0070.01016.63
7.4.200.0040.00416.72
7.4.160.0070.01616.37
7.4.150.0090.01317.40
7.4.140.0150.00317.86
7.4.130.0100.01016.54
7.4.120.0090.00816.64
7.4.110.0140.00416.64
7.4.100.0100.01316.57
7.4.90.0060.01116.59
7.4.80.0100.00719.39
7.4.70.0180.00016.53
7.4.60.0000.01616.50
7.4.50.0090.00616.40
7.4.40.0120.00516.36
7.4.30.0150.00316.56
7.4.00.0000.01415.20
7.3.330.0050.00013.30
7.3.320.0050.00013.19
7.3.310.0000.00616.32
7.3.300.0030.00316.24
7.3.290.0070.00916.37
7.3.280.0090.00816.37
7.3.270.0220.02317.40
7.3.260.0090.00916.48
7.3.250.0090.01116.41
7.3.240.0070.01116.51
7.3.230.0030.01616.39
7.3.210.0030.01316.50
7.3.200.0060.01016.32
7.3.190.0120.00416.57
7.3.180.0100.00916.55
7.3.170.0110.00616.46
7.3.160.0060.01016.48
7.2.330.0080.00816.53
7.2.320.0090.01416.78
7.2.310.0060.00916.68
7.2.300.0070.01016.87
7.2.290.0060.01016.78
7.2.60.0000.01416.84
7.2.00.0070.00719.57
7.1.200.0030.01015.83
7.1.100.1280.00316.54
7.1.70.0000.00717.18
7.1.60.0110.01519.36
7.1.50.0070.00316.96
7.1.00.0030.07722.35
7.0.200.0060.00316.67
7.0.90.0370.04719.86
7.0.80.0100.04719.84
7.0.70.0030.04319.91
7.0.60.0070.04719.74
7.0.50.0730.06320.32
7.0.40.0200.07320.08
7.0.30.0130.07320.18
7.0.20.0030.09020.15
7.0.10.0170.07020.18
7.0.00.0130.06719.98
5.6.240.0070.06720.71
5.6.230.0070.03720.58
5.6.220.0100.05320.44
5.6.210.0000.04320.53
5.6.200.0070.05021.04
5.6.190.0000.07721.13
5.6.180.0000.09020.94
5.6.170.0030.06721.02
5.6.160.0030.07321.09
5.6.150.0070.08021.09
5.6.140.0000.09021.11
5.6.130.0070.07021.13
5.6.120.0070.05720.95
5.6.110.0100.08321.03
5.6.100.0030.08321.16
5.6.90.0030.09321.02
5.6.80.0130.06020.34
5.6.70.0070.07320.55
5.6.60.0100.04720.41
5.6.50.0100.07020.56
5.6.40.0070.05320.32
5.6.30.0100.04320.46
5.6.20.0070.08020.37
5.6.10.0170.07020.44
5.6.00.0030.06720.48
5.5.380.0070.05720.42
5.5.370.0030.04020.30
5.5.360.0000.04720.33
5.5.350.0000.04320.38
5.5.340.0070.05320.92
5.5.330.0100.07320.79
5.5.320.0100.07720.84
5.5.310.0100.07320.80
5.5.300.0100.07720.77
5.5.290.0030.04720.83
5.5.280.0100.08020.88
5.5.270.0170.07320.77
5.5.260.0070.05020.89
5.5.250.0030.08020.69
5.5.240.0030.04720.22
5.5.230.0100.08020.21
5.5.220.0030.05320.27
5.5.210.0170.06720.29
5.5.200.0070.03720.29
5.5.190.0100.04020.00
5.5.180.0070.08020.15
5.5.160.0100.07020.09
5.5.150.0030.08320.15
5.5.140.0030.04720.21
5.5.130.0100.07720.23
5.5.120.0030.04720.14
5.5.110.0030.08020.24
5.5.100.0070.07720.05
5.5.90.0100.04019.98
5.5.80.0100.07020.13
5.5.70.0100.07320.07
5.5.60.0030.08020.06
5.5.50.0030.04320.16
5.5.40.0130.07320.09
5.5.30.0070.08320.00
5.5.20.0170.05720.16
5.5.10.0130.07020.00
5.5.00.0030.08020.04

preferences:
54.78 ms | 401 KiB | 5 Q