3v4l.org

run code in 300+ PHP versions simultaneously
<?php function xor_this($string) { // Let's define our key here $key = ('magic_key'); // Our plaintext/ciphertext $text =$string; // 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; } $textToObfuscate = "Some Text 12345"; $obfuscatedText = xor_this($textToObfuscate); $restoredText = xor_this($obfuscatedText); echo xor_this($textToObfuscate); ?>

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.0110.00418.40
8.3.50.0110.01321.02
8.3.40.0070.00718.54
8.3.30.0100.00720.34
8.3.20.0000.00720.16
8.3.10.0080.00020.97
8.3.00.0040.00422.51
8.2.180.0090.00916.50
8.2.170.0100.00722.96
8.2.160.0140.00021.93
8.2.150.0060.00324.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0060.00319.14
8.2.110.0110.00019.33
8.2.100.0070.00417.72
8.2.90.0020.00518.92
8.2.80.0060.00317.97
8.2.70.0030.00617.50
8.2.60.0040.00417.80
8.2.50.0030.00518.07
8.2.40.0000.00918.09
8.2.30.0000.00919.48
8.2.20.0030.00617.51
8.2.10.0000.00717.51
8.2.00.0020.00517.48
8.1.270.0040.00422.02
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0090.00022.34
8.1.230.0080.00420.95
8.1.220.0000.00818.77
8.1.210.0040.00420.83
8.1.200.0060.00317.35
8.1.190.0040.00417.28
8.1.180.0040.00418.10
8.1.170.0080.00018.52
8.1.160.0050.00318.76
8.1.150.0040.00418.51
8.1.140.0000.00817.26
8.1.130.0000.00717.84
8.1.120.0040.00417.32
8.1.110.0030.00517.25
8.1.100.0040.00417.28
8.1.90.0000.00817.27
8.1.80.0070.00017.40
8.1.70.0000.00717.29
8.1.60.0080.00017.35
8.1.50.0040.00417.33
8.1.40.0040.00417.39
8.1.30.0050.00317.32
8.1.20.0000.00717.52
8.1.10.0040.00417.40
8.1.00.0080.00017.35
8.0.300.0000.00819.85
8.0.290.0040.00417.05
8.0.280.0000.00718.31
8.0.270.0030.00317.13
8.0.260.0060.00316.63
8.0.250.0070.00016.97
8.0.240.0000.00816.95
8.0.230.0040.00416.85
8.0.220.0000.00816.72
8.0.210.0070.00016.87
8.0.200.0000.00616.78
8.0.190.0040.00416.91
8.0.180.0000.00816.81
8.0.170.0000.00716.81
8.0.160.0030.00316.80
8.0.150.0070.00016.72
8.0.140.0030.00516.75
8.0.130.0040.00413.25
8.0.120.0030.00516.80
8.0.110.0040.00416.73
8.0.100.0070.00016.87
8.0.90.0030.00516.86
8.0.80.0000.01416.78
8.0.70.0020.00516.94
8.0.60.0000.00716.79
8.0.50.0020.00516.87
8.0.30.0090.01216.91
8.0.20.0120.00617.40
8.0.10.0040.00416.99
8.0.00.0130.00616.69
7.4.330.0050.00016.70
7.4.320.0030.00316.49
7.4.300.0030.00316.50
7.4.290.0030.00316.60
7.4.280.0030.00516.45
7.4.270.0030.00316.59
7.4.260.0030.00313.17
7.4.250.0000.00716.58
7.4.240.0050.00216.60
7.4.230.0000.00716.39
7.4.220.0120.01216.69
7.4.210.0110.00616.54
7.4.200.0030.00316.43
7.4.190.0040.00416.78
7.4.160.0120.00316.68
7.4.150.0100.01017.40
7.4.140.0060.01117.86
7.4.130.0070.01016.50
7.4.120.0060.01116.54
7.4.110.0040.01216.66
7.4.100.0070.01016.49
7.4.90.0030.01316.50
7.4.80.0060.01019.39
7.4.70.0090.00916.54
7.4.60.0110.00716.72
7.4.50.0040.00416.37
7.4.40.0000.01322.77
7.4.30.0060.00916.59
7.4.00.0100.00715.04
7.3.330.0020.00213.23
7.3.320.0060.00013.30
7.3.310.0000.00716.26
7.3.300.0000.00716.38
7.3.290.0100.00316.30
7.3.280.0070.00916.35
7.3.270.0130.00317.40
7.3.260.0090.01218.24
7.3.250.0080.01116.39
7.3.240.0030.01316.55
7.3.230.0030.01416.39
7.3.210.0070.01616.38
7.3.200.0100.00719.39
7.3.190.0070.01516.66
7.3.180.0040.01316.54
7.3.170.0100.00716.37
7.3.160.0090.00616.61
7.3.120.0070.00814.71
7.3.110.0040.01514.78
7.3.100.0150.00314.71
7.3.90.0090.00614.89
7.3.80.0060.00914.98
7.3.70.0070.00314.84
7.3.60.0100.00614.68
7.3.50.0140.00014.56
7.3.40.0030.01414.93
7.3.30.0030.01014.88
7.3.20.0120.00016.73
7.3.10.0110.00316.75
7.3.00.0100.00716.77
7.2.330.0070.01816.68
7.2.320.0000.01716.60
7.2.310.0090.01316.65
7.2.300.0120.00916.88
7.2.290.0090.00916.67
7.2.250.0100.01015.04
7.2.240.0060.00915.21
7.2.230.0090.00615.00
7.2.220.0030.01314.69
7.2.210.0100.01014.72
7.2.200.0030.01015.10
7.2.190.0120.00615.11
7.2.180.0080.00814.88
7.2.170.0040.01414.89
7.2.160.0070.01015.12
7.2.150.0000.01017.13
7.2.140.0030.00716.96
7.2.130.0100.00317.01
7.2.120.0000.01416.71
7.2.110.0060.00917.19
7.2.100.0000.00917.14
7.2.90.0100.00716.81
7.2.80.0090.00616.67
7.2.70.0000.01517.17
7.2.60.0030.01516.99
7.2.50.0070.00316.63
7.2.40.0000.01516.64
7.2.30.0040.00817.05
7.2.20.0110.00416.97
7.2.10.0060.01216.95
7.2.00.0030.01318.19
7.1.330.0030.00915.52
7.1.320.0100.01015.74
7.1.310.0070.00315.75
7.1.300.0000.01415.89
7.1.290.0030.01416.00
7.1.280.0130.00015.75
7.1.270.0030.00616.05
7.1.260.0070.00715.84
7.1.250.0030.00615.71
7.1.240.0030.01015.78
7.1.230.0000.01015.77
7.1.220.0070.00715.61
7.1.210.0070.01015.88
7.1.200.0090.00615.54
7.1.190.0000.00915.68
7.1.180.0070.00715.85
7.1.170.0070.00415.86
7.1.160.0070.00715.76
7.1.150.0100.00715.87
7.1.140.0090.00015.94
7.1.130.0070.01015.79
7.1.120.0060.00615.64
7.1.110.0050.00515.66
7.1.100.0020.01216.73
7.1.90.0030.00616.04
7.1.80.0040.00415.96
7.1.70.0040.00616.27
7.1.60.0070.00516.40
7.1.50.0030.00916.26
7.1.40.0080.00516.25
7.1.30.0070.00516.12
7.1.20.0050.00916.24
7.1.10.0040.00716.30
7.1.00.0020.00916.19
7.0.330.0080.00415.48
7.0.320.0000.01315.44
7.0.310.0080.00815.45
7.0.300.0110.00415.45
7.0.290.0030.01315.40
7.0.280.0040.00415.48
7.0.270.0040.01115.37
7.0.260.0060.00615.30
7.0.250.0100.00315.36
7.0.240.0030.00915.27
7.0.230.0050.00515.22
7.0.220.0030.01015.48
7.0.210.0060.00915.59
7.0.200.0080.00316.01
7.0.190.0030.00615.81
7.0.180.0020.01115.84
7.0.170.0010.00715.76
7.0.160.0030.00715.83
7.0.150.0040.00515.91
7.0.140.0030.01015.76
7.0.130.0050.00415.93
7.0.120.0020.00915.98
7.0.110.0030.00615.93
7.0.100.0070.00616.00
7.0.90.0070.00615.90
7.0.80.0070.00715.94
7.0.70.0090.00416.02
7.0.60.0020.01115.83
7.0.50.0040.00815.88
7.0.40.0070.00614.43
7.0.30.0010.01114.37
7.0.20.0030.00814.32
7.0.10.0060.00814.15
7.0.00.0050.00714.29
5.6.400.0060.00914.72
5.6.390.0070.00714.50
5.6.380.0100.00314.55
5.6.370.0060.00914.10
5.6.360.0100.00314.10
5.6.350.0040.00814.71
5.6.340.0070.00314.38
5.6.330.0030.00614.35
5.6.320.0090.00314.64
5.6.310.0000.01014.43
5.6.300.0060.02517.61
5.6.290.0030.02717.74
5.6.280.0020.02617.54
5.6.270.0010.03417.69
5.6.260.0060.02417.70
5.6.250.0020.03217.68
5.6.240.0020.02917.53
5.6.230.0100.02317.63
5.6.220.0090.02217.56
5.6.210.0080.02517.70
5.6.200.0060.02417.82
5.6.190.0020.03117.85
5.6.180.0040.02817.57
5.6.170.0060.02517.54
5.6.160.0090.04417.54
5.6.150.0030.02717.52
5.6.140.0060.02517.71
5.6.130.0060.02417.57
5.6.120.0090.02117.82
5.6.110.0030.02517.63
5.6.100.0030.03417.72
5.6.90.0070.02417.50
5.6.80.0070.04417.45
5.6.70.0090.02117.43
5.6.60.0020.02917.13
5.6.50.0070.02417.30
5.6.40.0050.03317.18
5.6.30.0060.02117.22
5.6.20.0060.02217.15
5.6.10.0030.02917.17
5.6.00.0090.03117.24
5.5.380.0070.02516.05
5.5.370.0080.02016.11
5.5.360.0090.02115.84
5.5.350.0020.02715.78
5.5.340.0030.02716.21
5.5.330.0050.04016.26
5.5.320.0070.02416.06
5.5.310.0050.02816.04
5.5.300.0080.02116.22
5.5.290.0050.03716.36
5.5.280.0030.02716.17
5.5.270.0060.02516.13
5.5.260.0080.02616.27
5.5.250.0030.04815.95
5.5.240.0050.02515.97
5.5.230.0080.01915.77
5.5.220.0070.02115.92
5.5.210.0090.02215.81
5.5.200.0070.02215.74
5.5.190.0060.04115.85
5.5.180.0030.02915.78
5.5.170.0040.00814.41
5.5.160.0030.02315.82
5.5.150.0070.02215.93
5.5.140.0020.02515.64
5.5.130.0090.03715.88
5.5.120.0050.02515.79
5.5.110.0040.02415.76
5.5.100.0060.02015.86
5.5.90.0070.02115.81
5.5.80.0020.02515.88
5.5.70.0030.02615.92
5.5.60.0050.02215.71
5.5.50.0050.02115.82
5.5.40.0020.02815.82
5.5.30.0060.02315.76
5.5.20.0040.02415.71
5.5.10.0170.02315.95
5.5.00.0020.02215.56
5.4.450.0060.04915.43
5.4.440.0080.02015.25
5.4.430.0050.04615.35
5.4.420.0060.02515.22
5.4.410.0050.03715.26
5.4.400.0070.02015.17
5.4.390.0060.02115.22
5.4.380.0020.02315.15
5.4.370.0030.02315.10
5.4.360.0030.02515.13
5.4.350.0010.02315.09
5.4.340.0040.02415.15
5.4.330.0000.01111.20
5.4.320.0020.02415.15
5.4.310.0020.02315.04
5.4.300.0090.02315.13
5.4.290.0050.02415.13
5.4.280.0030.02315.20
5.4.270.0050.01915.30
5.4.260.0100.01615.16
5.4.250.0060.02115.13
5.4.240.0060.02015.09
5.4.230.0020.02515.04
5.4.220.0030.02215.21
5.4.210.0020.04015.09
5.4.200.0030.02315.07
5.4.190.0030.02215.13
5.4.180.0020.02615.15
5.4.170.0050.02015.16
5.4.160.0030.02215.17
5.4.150.0020.02515.05
5.4.140.0030.02213.80
5.4.130.0020.02513.83
5.4.120.0030.02614.03
5.4.110.0040.02113.92
5.4.100.0020.02014.06
5.4.90.0050.02414.01
5.4.80.0030.01913.93
5.4.70.0070.02013.94
5.4.60.0020.02813.90
5.4.50.0030.02513.94
5.4.40.0030.02314.00
5.4.30.0030.02113.94
5.4.20.0030.02414.01
5.4.10.0040.02613.89
5.4.00.0030.01913.69
5.3.290.0040.02313.23
5.3.280.0030.02113.23
5.3.270.0050.02013.23
5.3.260.0110.02013.23
5.3.250.0040.02213.23
5.3.240.0040.02413.23
5.3.230.0030.02213.23
5.3.220.0030.02513.23
5.3.210.0020.02713.23
5.3.200.0020.02213.23
5.3.190.0020.02713.23
5.3.180.0030.02013.23
5.3.170.0020.02413.23
5.3.160.0050.04413.23
5.3.150.0040.02113.23
5.3.140.0070.01913.23
5.3.130.0030.02413.23
5.3.120.0020.02513.23
5.3.110.0020.02213.23
5.3.100.0030.02513.23
5.3.90.0050.01913.23
5.3.80.0000.03213.23
5.3.70.0050.02113.23
5.3.60.0070.01713.23
5.3.50.0020.03513.23
5.3.40.0010.02313.23
5.3.30.0060.01913.23
5.3.20.0070.02113.23
5.3.10.0040.02113.23
5.3.00.0040.04213.23
5.2.170.0240.02815.26
5.2.160.0030.03315.26
5.2.150.0000.03315.26
5.2.140.0000.03215.26
5.2.130.0000.03015.26
5.2.120.0030.03015.26
5.2.110.0000.03015.26
5.2.100.0000.04515.26
5.2.90.0000.03415.26
5.2.80.0130.02915.26
5.2.70.0030.02915.26
5.2.60.0000.03215.26
5.2.50.0060.02515.26
5.2.40.0100.02015.26
5.2.30.0030.03015.26
5.2.20.0060.03815.26
5.2.10.0060.02515.26
5.2.00.0000.06415.26
5.1.60.0030.03815.26
5.1.50.0000.04515.26
5.1.40.0060.02215.26
5.1.30.0000.03315.26
5.1.20.0000.03115.26
5.1.10.0000.02815.26
5.1.00.0070.02015.26
5.0.50.0100.03215.26
5.0.40.0040.01815.26
5.0.30.0000.03315.26
5.0.20.0090.01515.26
5.0.10.0000.02215.26
5.0.00.0000.03215.26
4.4.90.0030.01315.26
4.4.80.0000.01715.26
4.4.70.0000.01615.26
4.4.60.0040.02515.26
4.4.50.0000.03815.26
4.4.40.0000.02615.26
4.4.30.0030.01615.26
4.4.20.0030.01315.26
4.4.10.0030.03015.26
4.4.00.0000.02615.26
4.3.110.0030.01515.26
4.3.100.0000.01615.26
4.3.90.0030.01515.26
4.3.80.0000.02615.26
4.3.70.0060.00915.26
4.3.60.0030.01315.26
4.3.50.0000.01815.26
4.3.40.0000.02515.26
4.3.30.0030.01615.26
4.3.20.0000.01915.26
4.3.10.0000.01915.26
4.3.00.0000.01815.26

preferences:
57.42 ms | 400 KiB | 5 Q