3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = "\xC2<script+%C2>alert(1);//%C2</script+%C2>"; function mb_htmlescape($s) { mb_regex_encoding('UTF-8'); $s = mb_ereg_replace('&', '&amp;', $s); $s = mb_ereg_replace('<', '&lt;', $s); $s = mb_ereg_replace('>', '&gt;', $s); $s = mb_ereg_replace('"', '&quot;', $s); return $s; } echo mb_htmlescape($x); echo htmlspecialchars($x);

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.0140.00418.68
8.3.50.0130.00321.21
8.3.40.0130.00318.57
8.3.30.0110.00418.88
8.3.20.0040.00418.81
8.3.10.0040.00421.48
8.3.00.0040.00419.05
8.2.180.0120.00318.56
8.2.170.0090.00622.96
8.2.160.0190.00019.14
8.2.150.0030.00524.18
8.2.140.0080.00024.66
8.2.130.0040.00421.09
8.2.120.0060.00926.35
8.2.110.0110.00020.52
8.2.100.0080.00317.91
8.2.90.0030.00519.35
8.2.80.0000.00817.97
8.2.70.0080.00017.60
8.2.60.0000.00917.78
8.2.50.0000.01018.10
8.2.40.0000.00820.67
8.2.30.0030.00620.57
8.2.20.0040.00417.89
8.2.10.0050.00218.09
8.2.00.0080.00018.13
8.1.280.0090.00925.92
8.1.270.0030.00524.10
8.1.260.0040.00428.09
8.1.250.0040.00428.09
8.1.240.0130.00322.17
8.1.230.0060.00621.07
8.1.220.0030.00617.79
8.1.210.0050.00318.77
8.1.200.0070.00317.35
8.1.190.0050.00317.10
8.1.180.0040.00418.10
8.1.170.0000.00818.71
8.1.160.0030.00319.08
8.1.150.0070.00018.85
8.1.140.0050.00219.56
8.1.130.0040.00417.82
8.1.120.0070.00017.55
8.1.110.0030.00317.43
8.1.100.0000.00717.53
8.1.90.0050.00217.36
8.1.80.0040.00417.46
8.1.70.0000.00717.54
8.1.60.0030.00517.69
8.1.50.0040.00417.62
8.1.40.0040.00417.57
8.1.30.0030.00617.80
8.1.20.0000.00817.70
8.1.10.0070.00017.48
8.1.00.0050.00217.57
8.0.300.0040.00418.77
8.0.290.0000.00816.88
8.0.280.0030.00318.51
8.0.270.0000.00717.29
8.0.260.0030.00317.32
8.0.250.0030.00516.95
8.0.240.0000.00717.04
8.0.230.0000.00816.97
8.0.220.0050.00216.84
8.0.210.0000.00616.82
8.0.200.0030.00316.96
8.0.190.0000.00716.97
8.0.180.0040.00416.96
8.0.170.0040.00416.93
8.0.160.0000.00717.01
8.0.150.0030.00316.90
8.0.140.0080.00016.90
8.0.130.0000.00613.41
8.0.120.0040.00416.82
8.0.110.0020.00516.96
8.0.100.0040.00416.84
8.0.90.0000.00716.96
8.0.80.0190.00016.89
8.0.70.0000.00716.85
8.0.60.0040.00416.82
8.0.50.0000.00716.84
8.0.30.0110.00717.03
8.0.20.0120.00817.40
8.0.10.0070.00016.92
8.0.00.0100.00816.78
7.4.330.0000.00515.08
7.4.320.0060.00016.58
7.4.300.0000.00616.60
7.4.290.0060.00316.55
7.4.280.0030.00616.62
7.4.270.0000.00616.66
7.4.260.0040.00416.60
7.4.250.0000.00816.52
7.4.240.0030.00316.74
7.4.230.0030.00316.83
7.4.220.0170.01016.66
7.4.210.0090.00616.65
7.4.200.0000.00716.44
7.4.160.0090.00616.42
7.4.150.0030.01617.40
7.4.140.0150.00717.86
7.4.130.0120.00616.62
7.4.120.0110.00616.54
7.4.110.0100.00716.45
7.4.100.0140.00316.68
7.4.90.0120.00416.53
7.4.80.0110.00719.39
7.4.70.0070.01016.65
7.4.60.0080.00816.55
7.4.50.0040.01516.39
7.4.40.0090.01016.60
7.4.30.0060.00916.63
7.4.00.0030.01015.24
7.3.330.0070.00013.35
7.3.320.0060.00013.08
7.3.310.0030.00316.34
7.3.300.0070.00016.30
7.3.290.0090.00616.31
7.3.280.0100.00916.27
7.3.270.0060.01017.40
7.3.260.0120.00916.38
7.3.250.0100.00916.33
7.3.240.0030.01316.34
7.3.230.0100.00616.39
7.3.210.0100.01016.50
7.3.200.0030.01316.51
7.3.190.0090.01316.56
7.3.180.0100.00616.55
7.3.170.0090.00616.42
7.3.160.0070.01116.52
7.2.330.0070.01016.71
7.2.320.0090.00616.43
7.2.310.0060.01616.40
7.2.300.0060.01216.45
7.2.290.0030.01316.45
7.2.60.0030.00716.71
7.2.00.0120.00819.55
7.1.200.0080.00315.64
7.1.100.0000.01417.76
7.1.70.0040.00417.11
7.1.60.0120.00919.13
7.1.50.0040.01917.17
7.1.00.0000.07722.48
7.0.200.0000.00916.80
7.0.60.0300.06719.80
7.0.50.0230.05320.26
7.0.40.0400.05320.20
7.0.30.0270.07320.36
7.0.20.0300.06720.34
7.0.10.0070.06720.34
7.0.00.0130.07720.41
5.6.280.0030.07321.15
5.6.210.0070.07720.63
5.6.200.0070.08318.22
5.6.190.0330.06021.09
5.6.180.0400.07020.94
5.6.170.0170.06021.09
5.6.160.0370.06321.16
5.6.150.0130.07021.20
5.6.140.0470.07321.13
5.6.130.0370.06021.10
5.6.120.0130.05721.14
5.6.110.0430.06021.11
5.6.100.0270.06721.10
5.6.90.0230.06321.14
5.6.80.0330.05720.43
5.6.70.0200.07020.43
5.6.60.0170.05020.48
5.6.50.0270.07320.41
5.6.40.0130.05720.51
5.6.30.0330.05320.46
5.6.20.0400.05020.44
5.6.10.0270.05720.40
5.6.00.0330.05320.28
5.5.350.3800.03320.33
5.5.340.0100.04317.99
5.5.330.0200.05320.88
5.5.320.0070.06721.02
5.5.310.0230.06020.85
5.5.300.0370.06020.84
5.5.290.0370.06720.86
5.5.280.0170.05720.89
5.5.270.0200.05720.84
5.5.260.0370.05720.98
5.5.250.0230.06020.82
5.5.240.0200.06720.25
5.5.230.0200.06320.26
5.5.220.0330.06020.26
5.5.210.0300.07320.07
5.5.200.0230.06020.20
5.5.190.0270.08320.20
5.5.180.0270.06020.04
5.5.160.0300.05320.14
5.5.150.0370.06720.21
5.5.140.0430.03720.19
5.5.130.0370.04720.33
5.5.120.0470.06320.26
5.5.110.0400.05020.23
5.5.100.0430.05720.28
5.5.90.0330.05019.94
5.5.80.0130.05720.10
5.5.70.0230.06719.92
5.5.60.0400.04720.24
5.5.50.0330.04719.90
5.5.40.0270.06320.18
5.5.30.0070.06320.09
5.5.20.0230.05720.14
5.5.10.0200.08020.14
5.5.00.0200.07020.13

preferences:
62.08 ms | 401 KiB | 5 Q