3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'HDO Intranet — Futar.png'; $encoded = htmlentities($string); $result = $encoded; //$result = preg_replace('/&([a-z]{1,2})(?:acute|cedil|circ|grave|lig|orn|ring|slash|tilde|uml);/i', '$1', $result); $result = preg_replace('/&([a-z]{1})[a-z]+;/i', '$1', $result); $result = preg_replace('/[^a-zA-Z\d\s-_\.;&]/', '', $result); echo $result;

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.0030.01416.88
8.3.50.0100.00722.18
8.3.40.0090.00619.00
8.3.30.0070.00719.02
8.3.20.0040.00420.21
8.3.10.0000.00823.65
8.3.00.0080.00417.75
8.2.180.0070.01018.69
8.2.170.0150.00022.96
8.2.160.0170.00320.27
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0140.00322.39
8.2.110.0060.00322.19
8.2.100.0070.00417.97
8.2.90.0030.00819.16
8.2.80.0080.00017.97
8.2.70.0040.00717.63
8.2.60.0000.00817.80
8.2.50.0040.00718.07
8.2.40.0080.00019.88
8.2.30.0000.00819.89
8.2.20.0050.00317.86
8.2.10.0040.00418.14
8.2.00.0000.00717.78
8.1.280.0110.00725.92
8.1.270.0000.00823.79
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00323.87
8.1.230.0100.00019.16
8.1.220.0050.00317.78
8.1.210.0000.00818.77
8.1.200.0040.00417.35
8.1.190.0050.00317.22
8.1.180.0030.00619.01
8.1.170.0000.00818.69
8.1.160.0050.00221.91
8.1.150.0020.00518.66
8.1.140.0000.00717.41
8.1.130.0030.00317.89
8.1.120.0040.00417.43
8.1.110.0040.00417.55
8.1.100.0040.00417.46
8.1.90.0040.00417.43
8.1.80.0050.00217.55
8.1.70.0000.00717.41
8.1.60.0060.00317.57
8.1.50.0040.00417.63
8.1.40.0040.00417.57
8.1.30.0030.00517.49
8.1.20.0050.00217.62
8.1.10.0090.00017.67
8.1.00.0040.00417.43
8.0.300.0070.00018.77
8.0.290.0070.00017.18
8.0.280.0040.00418.46
8.0.270.0000.00717.34
8.0.260.0060.00017.27
8.0.250.0000.00717.10
8.0.240.0070.00317.09
8.0.230.0030.00317.08
8.0.220.0050.00317.01
8.0.210.0040.00416.94
8.0.200.0030.00517.09
8.0.190.0080.00017.02
8.0.180.0000.00817.05
8.0.170.0040.00417.11
8.0.160.0070.00017.16
8.0.150.0000.00716.98
8.0.140.0050.00317.02
8.0.130.0000.00613.42
8.0.120.0040.00417.00
8.0.110.0050.00317.05
8.0.100.0030.00516.93
8.0.90.0000.00816.83
8.0.80.0000.01517.09
8.0.70.0070.00016.97
8.0.60.0000.00717.09
8.0.50.0040.00417.06
8.0.30.0120.01017.23
8.0.20.0130.00617.45
8.0.10.0000.00717.22
8.0.00.0140.00616.94
7.4.330.0050.00015.00
7.4.320.0030.00316.79
7.4.300.0000.00616.65
7.4.290.0000.00716.75
7.4.280.0000.00716.75
7.4.270.0050.00316.62
7.4.260.0000.00716.74
7.4.250.0000.00716.57
7.4.240.0000.00716.76
7.4.230.0030.00316.76
7.4.220.0070.01116.51
7.4.210.0090.00716.70
7.4.200.0030.00316.82
7.4.190.0070.00016.92
7.4.160.0060.01216.81
7.4.150.0170.00017.40
7.4.140.0080.00917.86
7.4.130.0110.00616.63
7.4.120.0110.00616.66
7.4.110.0170.00016.44
7.4.100.0090.01016.80
7.4.90.0100.00716.47
7.4.80.0070.01319.39
7.4.70.0130.00316.68
7.4.60.0090.00916.68
7.4.50.0060.00316.38
7.4.40.0090.01316.60
7.4.30.0090.00616.88
7.4.00.0100.00015.18
7.3.330.0060.00013.45
7.3.320.0000.00513.38
7.3.310.0000.00716.43
7.3.300.0000.00716.51
7.3.290.0070.00716.46
7.3.280.0110.00816.49
7.3.270.0090.00917.40
7.3.260.0090.00916.57
7.3.250.0110.00516.60
7.3.240.0060.01016.77
7.3.230.0100.00716.56
7.3.210.0110.00516.41
7.3.200.0120.00919.39
7.3.190.0160.00616.71
7.3.180.0090.00616.46
7.3.170.0120.00416.53
7.3.160.0090.00916.54
7.3.120.0030.01415.05
7.2.330.0190.00316.74
7.2.320.0100.01016.76
7.2.310.0090.01216.63
7.2.300.0080.00816.70
7.2.290.0070.01716.85
7.2.00.0000.01219.68
7.1.200.0110.00016.09
7.1.100.0060.00618.46
7.1.70.0040.00417.49
7.1.60.0060.01919.46
7.1.50.0130.00917.33
7.1.00.0100.07322.32
7.0.200.0090.00016.82
7.0.140.0100.06722.21
7.0.60.0030.04019.91
7.0.50.0000.08717.89
7.0.40.0070.08720.26
7.0.30.0300.07720.18
7.0.20.0270.06720.18
7.0.10.0100.05320.14
7.0.00.0070.05320.14
5.6.280.0000.07721.06
5.6.210.0170.06720.70
5.6.200.0070.08318.23
5.6.190.0030.06020.48
5.6.180.0230.05320.39
5.6.170.0370.07720.40
5.6.160.0200.07020.49
5.6.150.0000.04018.16
5.6.140.0070.06018.07
5.6.130.0030.08318.15
5.6.120.0030.05321.09
5.6.110.0130.07721.10
5.6.100.0070.05020.97
5.6.90.0030.04320.98
5.6.80.0030.04020.39
5.5.350.4300.04020.43
5.5.340.0130.07718.00
5.5.330.0100.07320.34
5.5.320.0170.05320.17
5.5.310.0200.04020.39
5.5.300.0000.04717.89
5.5.290.0030.04017.91
5.5.280.0070.08320.89
5.5.270.0000.04320.73
5.5.260.0000.04720.94
5.5.250.0070.06720.58
5.5.240.0130.06720.15
5.4.450.0300.05319.48
5.4.440.0330.06719.51
5.4.430.0230.07019.63
5.4.420.0230.07319.41
5.4.410.0270.05019.51
5.4.400.0300.05719.29
5.4.390.0230.06719.16
5.4.380.0370.05318.74
5.4.370.0370.04718.74
5.4.360.0200.05718.68
5.4.350.0400.04718.68
5.4.340.0300.05018.52
5.4.320.0090.04012.45
5.4.310.0100.04112.45
5.4.300.0090.03812.45
5.4.290.0080.05112.44
5.4.280.0080.04712.34
5.4.270.0100.04512.34
5.4.260.0100.04712.34
5.4.250.0110.06012.34
5.4.240.0050.03812.34
5.4.230.0060.03812.33
5.4.220.0100.03412.33
5.4.210.0060.04412.33
5.4.200.0080.05412.33
5.4.190.0070.03612.32
5.4.180.0050.03812.33
5.4.170.0060.03812.34
5.4.160.0100.04612.33
5.4.150.0100.04512.33
5.4.140.0090.04512.02
5.4.130.0080.04912.00
5.4.120.0070.05111.96
5.4.110.0070.05211.96
5.4.100.0050.05211.95
5.4.90.0100.03411.95
5.4.80.0080.04711.95
5.4.70.0110.04711.95
5.4.60.0130.05211.95
5.4.50.0050.05211.95
5.4.40.0060.05111.94
5.4.30.0050.05311.94
5.4.20.0060.05311.94
5.4.10.0080.04911.93
5.4.00.0100.04611.43
5.3.290.0100.04212.80
5.3.280.0060.03712.71
5.3.270.0060.05612.72
5.3.260.0090.03612.72
5.3.250.0020.04612.72
5.3.240.0060.04012.72
5.3.230.0070.04512.71
5.3.220.0040.04112.68
5.3.210.0050.04112.68
5.3.200.0060.04512.68
5.3.190.0110.03412.68
5.3.180.0050.03712.67
5.3.170.0030.04412.67
5.3.160.0060.03812.67
5.3.150.0070.04012.67
5.3.140.0090.03712.66
5.3.130.0100.04012.65
5.3.120.0080.04312.66
5.3.110.0070.05012.66
5.3.100.0090.09112.12
5.3.90.0070.03812.08
5.3.80.0080.04212.07
5.3.70.0070.03812.07
5.3.60.0070.03712.07
5.3.50.0060.04312.00
5.3.40.0040.05112.00
5.3.30.0090.07311.95
5.3.20.0080.06611.73
5.3.10.0110.05211.70
5.3.00.0080.05511.69
5.2.170.0070.0669.19
5.2.160.0070.0479.19
5.2.150.0170.0599.19
5.2.140.0120.0399.18
5.2.130.0070.0379.14
5.2.120.0070.0439.15
5.2.110.0080.0359.15
5.2.100.0050.0309.16
5.2.90.0040.0419.15
5.2.80.0070.0329.14
5.2.70.0080.0409.15
5.2.60.0060.0349.10
5.2.50.0050.0329.07
5.2.40.0060.0329.05
5.2.30.0030.0369.02
5.2.20.0070.0339.01
5.2.10.0050.0318.92
5.2.00.0100.0338.78
5.1.60.0060.0268.06
5.1.50.0040.0278.06
5.1.40.0030.0278.05
5.1.30.0060.0288.39
5.1.20.0060.0278.42
5.1.10.0040.0278.14
5.1.00.0060.0248.14
5.0.50.0060.0186.62
5.0.40.0050.0186.48
5.0.30.0040.0316.29
5.0.20.0060.0176.26
5.0.10.0090.0156.24
5.0.00.0040.0386.23
4.4.90.0040.0234.78
4.4.80.0040.0264.76
4.4.70.0060.0224.75
4.4.60.0060.0404.76
4.4.50.0040.0314.77
4.4.40.0040.0724.71
4.4.30.0030.0324.76
4.4.20.0030.0344.85
4.4.10.0030.0244.85
4.4.00.0020.0414.76
4.3.110.0050.0274.67
4.3.100.0030.0284.66
4.3.90.0050.0244.63
4.3.80.0050.0334.58
4.3.70.0040.0204.63
4.3.60.0040.0214.63
4.3.50.0030.0184.63
4.3.40.0020.0394.54
4.3.30.0030.0193.29
4.3.20.0040.0203.26
4.3.10.0020.0203.22
4.3.00.0070.0207.24

preferences:
49.64 ms | 401 KiB | 5 Q