3v4l.org

run code in 300+ PHP versions simultaneously
<?php function xor_this($string) { // Let's define our key here $key = ('12341234'); // Our plaintext/ciphertext $text ='adeabecc'; // Our output text $outText = ''; // Iterate through each character for($i=0;$i<strlen($text);) { for($j=0;($j<strlen($key) && $i<strlen($text));$j++,$i++) { $outText .= $text{$i} ^ $key{$j}; echo 'i='.$i.', '.'j='.$j.', '.$outText{$i}.'<br />'; //for debugging } } return $outText; } echo xor_this('adeabecc');

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.70.0090.00618.43
8.3.60.0110.00416.50
8.3.50.0180.00422.05
8.3.40.0000.01518.36
8.3.30.0140.00018.45
8.3.20.0040.00420.21
8.3.10.0040.00423.53
8.3.00.0080.00019.26
8.2.190.0030.01416.58
8.2.180.0150.00416.50
8.2.170.0100.00722.96
8.2.160.0110.00420.24
8.2.150.0090.00024.18
8.2.140.0050.00324.66
8.2.130.0080.00017.25
8.2.120.0040.00426.35
8.2.110.0060.00320.98
8.2.100.0090.00317.78
8.2.90.0000.00918.02
8.2.80.0090.00018.09
8.2.70.0040.00417.91
8.2.60.0070.00319.51
8.2.50.0000.00818.10
8.2.40.0040.00420.59
8.2.30.0000.00820.68
8.2.20.0000.01017.42
8.2.10.0000.00717.96
8.2.00.0000.00817.82
8.1.280.0170.00325.92
8.1.270.0000.01122.14
8.1.260.0050.00328.09
8.1.250.0040.00428.09
8.1.240.0100.00723.97
8.1.230.0080.00420.89
8.1.220.0080.00017.74
8.1.210.0030.00618.77
8.1.200.0050.00317.23
8.1.190.0030.00617.10
8.1.180.0040.00418.10
8.1.170.0050.00318.64
8.1.160.0040.00422.13
8.1.150.0000.00718.74
8.1.140.0030.00619.40
8.1.130.0000.00717.44
8.1.120.0030.00517.34
8.1.110.0080.00317.21
8.1.100.0000.00717.30
8.1.90.0000.00817.38
8.1.80.0070.00017.40
8.1.70.0030.00317.21
8.1.60.0000.01117.46
8.1.50.0040.00417.42
8.1.40.0080.00317.38
8.1.30.0030.00617.56
8.1.20.0020.00517.50
8.1.10.0000.00817.37
8.1.00.0080.00417.27
8.0.300.0070.00019.86
8.0.290.0030.00616.63
8.0.280.0000.00818.30
8.0.270.0070.00017.05
8.0.260.0030.00516.99
8.0.250.0000.00816.93
8.0.240.0040.00416.84
8.0.230.0000.00716.83
8.0.220.0070.00016.69
8.0.210.0050.00516.80
8.0.200.0030.00316.77
8.0.190.0030.00316.88
8.0.180.0040.00416.84
8.0.170.0050.00216.72
8.0.160.0080.00016.65
8.0.150.0070.00016.84
8.0.140.0070.00016.75
8.0.130.0050.00013.24
8.0.120.0030.00516.87
8.0.110.0030.00516.65
8.0.100.0000.00716.77
8.0.90.0020.00516.61
8.0.80.0070.00716.70
8.0.70.0030.00516.77
8.0.60.0000.00816.82
8.0.50.0040.00416.73
8.0.30.0070.01217.00
8.0.20.0100.00917.40
8.0.10.0070.00017.05
8.0.00.0080.00916.46
7.4.330.0050.00016.71
7.4.320.0060.00016.59
7.4.300.0030.00316.51
7.4.290.0030.00516.61
7.4.280.0040.00416.60
7.4.270.0060.00016.58
7.4.260.0000.00716.46
7.4.250.0000.00816.38
7.4.240.0050.00216.57
7.4.230.0050.00216.61
7.4.220.0060.01316.43
7.4.210.0100.00516.58
7.4.200.0040.00416.68
7.4.160.0060.00916.39
7.4.150.0070.01117.40
7.4.140.0160.01017.86
7.4.130.0050.01316.45
7.4.120.0060.01116.54
7.4.110.0090.00916.59
7.4.100.0120.01216.46
7.4.90.0090.00916.55
7.4.80.0170.00519.39
7.4.70.0110.00616.42
7.4.60.0030.01316.73
7.4.50.0070.01116.47
7.4.40.0090.01216.51
7.4.30.0150.00916.80
7.4.00.0030.00914.91
7.3.330.0030.00313.20
7.3.320.0060.00013.37
7.3.310.0050.00216.38
7.3.300.0000.00716.34
7.3.290.0000.00716.24
7.3.280.0100.00616.38
7.3.270.0150.01217.40
7.3.260.0150.00616.50
7.3.250.0080.00816.43
7.3.240.0090.01016.51
7.3.230.0160.00016.60
7.3.210.0160.00616.36
7.3.200.0120.00916.64
7.3.190.0140.00516.25
7.3.180.0070.01016.41
7.3.170.0120.00916.43
7.3.160.0140.00516.36
7.2.330.0130.00316.68
7.2.320.0090.00916.75
7.2.310.0160.00016.68
7.2.300.0060.01016.76
7.2.290.0170.00316.77
7.2.110.0110.01516.78
7.2.100.0140.01316.78
7.2.90.0330.01216.57
7.2.80.0210.01116.71
7.2.70.0200.01217.00
7.2.60.0190.01316.80
7.2.50.0340.01616.93
7.2.40.0160.01316.97
7.2.30.0360.01316.94
7.2.20.0150.01216.93
7.2.10.0330.01416.82
7.2.00.0130.00818.10
7.1.230.0840.01015.89
7.1.220.0320.01015.66
7.1.210.0190.00915.73
7.1.200.0140.01415.76
7.1.190.0210.00315.47
7.1.180.0240.00715.88
7.1.170.0160.01015.35
7.1.160.0180.00615.84
7.1.150.0130.01315.79
7.1.140.0190.00416.00
7.1.130.0190.00515.71
7.1.120.0200.00715.57
7.1.110.0210.00615.94
7.1.100.0090.00917.13
7.1.90.0340.00415.83
7.1.80.0330.00415.78
7.1.70.0310.01216.33
7.1.60.0160.01217.51
7.1.50.0200.01425.33
7.1.40.0360.01215.91
7.1.30.0170.01415.64
7.1.20.0190.01615.71
7.1.10.0110.01115.53
7.1.00.0250.03818.83
7.0.310.0410.00615.21
7.0.300.0360.00615.45
7.0.290.0340.00615.19
7.0.280.0050.01915.34
7.0.270.0320.01115.39
7.0.260.0420.00415.36
7.0.250.0270.00915.56
7.0.240.0150.00815.42
7.0.230.0180.00515.38
7.0.220.0090.01315.40
7.0.210.0170.00915.43
7.0.200.0080.00816.19
7.0.190.0480.01015.37
7.0.180.0170.00815.38
7.0.170.0410.00915.46
7.0.160.0160.00915.36
7.0.150.0370.00515.47
7.0.140.0330.00815.20
7.0.130.0290.01315.54
7.0.120.0420.01014.95
7.0.110.0260.01515.39
7.0.100.0370.00315.34
7.0.90.0620.00715.40
7.0.80.0690.00715.10
7.0.70.0370.00315.22
7.0.60.0270.04217.72
7.0.50.0330.04316.70
7.0.40.0200.02716.83
7.0.30.0210.02316.71
7.0.20.0230.02216.94
7.0.10.0110.04516.58
7.0.00.0120.04716.86
5.6.380.0180.00814.40
5.6.370.0100.01414.32
5.6.360.0070.01814.27
5.6.350.0140.01114.52
5.6.340.0140.01414.57
5.6.330.0160.00814.51
5.6.320.0180.00914.20
5.6.310.0170.01114.51
5.6.300.0180.00614.16
5.6.290.0270.00814.03
5.6.280.0220.01517.65
5.6.270.0320.00014.40
5.6.260.0370.01813.98
5.6.250.0290.00814.23
5.6.240.0350.00814.41
5.6.230.0290.01314.27
5.6.220.0280.00914.17
5.6.210.0220.03417.56
5.6.200.0180.02416.12
5.6.190.0260.02217.26
5.6.180.0400.04317.25
5.6.170.0200.04517.38
5.6.160.0110.03017.51
5.6.150.0100.05016.32
5.6.140.0110.04116.14
5.6.130.0160.04216.23
5.6.120.0160.03317.66
5.6.110.0100.02617.76
5.6.100.0130.03817.77
5.6.90.0160.04317.68
5.6.80.0160.04317.18
5.6.70.0050.02014.08
5.6.60.0220.00414.37
5.6.50.0170.00714.37
5.6.40.0180.00914.44
5.6.30.0110.01414.45
5.6.20.0190.00314.15
5.6.10.0190.00914.24
5.6.00.0170.00814.18
5.5.380.0270.00011.29
5.5.370.0100.00411.46
5.5.360.0160.00511.58
5.5.350.0090.02315.68
5.5.340.0170.02914.70
5.5.330.0160.02115.79
5.5.320.0100.02715.88
5.5.310.0150.02315.69
5.5.300.0070.02414.60
5.5.290.0100.02514.65
5.5.280.0070.02816.12
5.5.270.0060.04516.09
5.5.260.0130.01815.98
5.5.250.0070.02416.03
5.5.240.0160.03815.82
5.5.230.0070.00711.36
5.5.220.0140.00311.29
5.5.210.0120.00611.35
5.5.200.0090.00910.84
5.5.190.0080.00811.21
5.5.180.0120.00411.36
5.5.170.0150.00814.29
5.5.160.0120.00311.34
5.5.150.0180.00011.48
5.5.140.0110.00511.29
5.5.130.0090.00511.11
5.5.120.0110.00310.97
5.5.110.0160.00010.98
5.5.100.0130.00311.05
5.5.90.0100.00311.07
5.5.80.0040.01311.16
5.5.70.0110.00710.96
5.5.60.0100.00511.37
5.5.50.0150.00410.97
5.5.40.0040.01211.20
5.5.30.0150.00010.81
5.5.20.0080.00811.37
5.5.10.0090.00611.34
5.5.00.0120.00611.29

preferences:
58.54 ms | 401 KiB | 5 Q