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,2})[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.0110.00716.63
8.3.50.0080.00818.09
8.3.40.0150.00019.00
8.3.30.0110.00418.91
8.3.20.0050.00320.20
8.3.10.0060.00323.66
8.3.00.0070.00319.63
8.2.180.0140.00718.54
8.2.170.0170.00322.96
8.2.160.0100.00320.54
8.2.150.0070.00024.18
8.2.140.0050.00324.66
8.2.130.0080.00026.16
8.2.120.0040.00422.30
8.2.110.0090.00022.29
8.2.100.0090.00619.83
8.2.90.0000.00819.12
8.2.80.0000.00817.97
8.2.70.0070.00417.75
8.2.60.0030.00517.80
8.2.50.0030.00718.07
8.2.40.0080.00020.06
8.2.30.0000.00819.98
8.2.20.0040.00417.75
8.2.10.0040.00418.20
8.2.00.0030.00617.93
8.1.270.0050.00323.96
8.1.260.0050.00326.35
8.1.250.0080.00028.09
8.1.240.0060.00323.73
8.1.230.0100.00019.08
8.1.220.0050.00317.74
8.1.210.0080.00018.77
8.1.200.0030.00617.35
8.1.190.0000.00817.23
8.1.180.0030.00619.14
8.1.170.0040.00418.51
8.1.160.0040.00421.90
8.1.150.0040.00418.79
8.1.140.0000.00817.55
8.1.130.0000.00717.78
8.1.120.0000.00717.48
8.1.110.0070.00017.58
8.1.100.0050.00317.52
8.1.90.0070.00017.62
8.1.80.0080.00017.59
8.1.70.0000.00717.45
8.1.60.0040.00417.66
8.1.50.0040.00417.62
8.1.40.0040.00417.59
8.1.30.0040.00417.65
8.1.20.0080.00017.70
8.1.10.0030.00617.69
8.1.00.0000.00817.50
8.0.300.0040.00418.77
8.0.290.0030.00517.05
8.0.280.0000.00818.48
8.0.270.0050.00317.39
8.0.260.0060.00017.30
8.0.250.0030.00317.13
8.0.240.0090.00017.21
8.0.230.0080.00017.09
8.0.220.0040.00416.98
8.0.210.0040.00416.96
8.0.200.0030.00317.00
8.0.190.0040.00417.00
8.0.180.0030.00617.09
8.0.170.0000.00917.09
8.0.160.0040.00417.11
8.0.150.0000.00717.02
8.0.140.0040.00416.98
8.0.130.0060.00313.47
8.0.120.0080.00016.90
8.0.110.0060.00317.03
8.0.100.0040.00416.93
8.0.90.0040.00416.85
8.0.80.0110.00416.99
8.0.70.0070.00016.94
8.0.60.0050.00317.02
8.0.50.0040.00416.91
8.0.30.0070.01317.13
8.0.20.0100.00817.47
8.0.10.0000.00717.11
8.0.00.0110.00716.96
7.4.330.0000.00515.00
7.4.320.0000.00616.66
7.4.300.0060.00016.81
7.4.290.0000.00716.71
7.4.280.0040.00416.80
7.4.270.0030.00316.67
7.4.260.0070.00016.51
7.4.250.0040.00416.61
7.4.240.0020.00616.64
7.4.230.0000.00716.59
7.4.220.0100.00716.66
7.4.210.0090.00616.71
7.4.200.0040.00416.54
7.4.190.0070.00016.62
7.4.160.0100.00616.59
7.4.150.0140.00517.40
7.4.140.0040.01417.86
7.4.130.0080.00916.81
7.4.120.0070.01016.61
7.4.110.0060.01216.60
7.4.100.0100.01116.82
7.4.90.0100.00716.68
7.4.80.0180.00419.39
7.4.70.0060.01116.50
7.4.60.0190.00016.50
7.4.50.0040.00416.36
7.4.40.0030.01416.71
7.4.30.0080.00816.68
7.4.00.0000.01214.87
7.3.330.0060.00013.21
7.3.320.0000.00513.38
7.3.310.0040.00416.61
7.3.300.0000.00716.43
7.3.290.0090.00716.45
7.3.280.0090.01016.46
7.3.270.0140.00417.40
7.3.260.0110.00916.50
7.3.250.0090.00916.45
7.3.240.0030.01316.64
7.3.230.0100.00616.59
7.3.210.0100.01016.59
7.3.200.0090.01219.39
7.3.190.0130.01016.48
7.3.180.0090.00916.36
7.3.170.0080.00816.51
7.3.160.0150.00416.42
7.3.120.0060.01015.04
7.3.00.0000.01416.35
7.2.330.0060.01216.75
7.2.320.0110.00716.80
7.2.310.0030.01516.59
7.2.300.0080.01216.70
7.2.290.0130.00316.73
7.2.130.0030.01016.89
7.2.120.0000.01516.71
7.2.110.0030.01016.99
7.2.100.0060.00316.91
7.2.90.0040.01117.08
7.2.80.0070.00317.04
7.2.70.0000.01317.21
7.2.60.0060.00916.96
7.2.50.0030.01016.95
7.2.40.0060.00616.93
7.2.30.0070.00717.04
7.2.20.0080.00817.04
7.2.10.0030.00817.07
7.2.00.0090.00316.92
7.1.250.0120.00316.06
7.1.240.0070.00716.04
7.1.230.0030.00615.80
7.1.220.0000.01115.72
7.1.210.0060.00915.89
7.1.200.0040.00915.99
7.1.190.0090.00015.98
7.1.180.0030.00615.91
7.1.170.0060.00316.03
7.1.160.0030.01015.97
7.1.150.0100.00315.68
7.1.140.0060.00916.09
7.1.130.0030.00916.10
7.1.120.0060.00915.69
7.1.110.0040.01116.10
7.1.100.0060.00615.86
7.1.90.0090.00016.13
7.1.80.0030.00715.79
7.1.70.0030.00716.39
7.1.60.0090.01117.68
7.1.50.0030.01216.39
7.1.40.0000.00916.10
7.1.30.0100.00616.02
7.1.20.0030.00815.93
7.1.10.0070.00315.96
7.1.00.0030.04319.21
7.0.330.0100.00015.41
7.0.320.0030.00915.43
7.0.310.0070.01015.79
7.0.300.0040.00415.65
7.0.290.0070.00715.50
7.0.280.0000.00915.36
7.0.270.0040.00415.20
7.0.260.0060.00315.18
7.0.250.0040.00915.31
7.0.240.0060.00615.51
7.0.230.0060.00915.23
7.0.220.0000.01015.41
7.0.210.0080.00315.36
7.0.200.0020.00916.16
7.0.190.0110.00315.61
7.0.180.0070.00715.41
7.0.170.0100.00315.37
7.0.160.0030.01215.71
7.0.150.0030.01215.43
7.0.140.0030.04018.82
7.0.130.0000.00915.33
7.0.120.0110.00315.38
7.0.110.0090.00315.59
7.0.100.0070.00715.31
7.0.90.0000.01115.48
7.0.80.0000.01015.66
7.0.70.0060.00615.48
7.0.60.0020.02617.80
7.0.50.0030.02916.73
7.0.40.0060.02616.71
7.0.30.0240.02916.93
7.0.20.0180.04316.90
7.0.10.0050.04316.86
7.0.00.0080.04116.95
5.6.380.0030.00914.06
5.6.370.0110.00414.18
5.6.360.0030.00914.06
5.6.350.0120.00314.55
5.6.340.0040.00714.12
5.6.330.0030.01214.53
5.6.320.0000.00814.16
5.6.310.0030.01014.19
5.6.300.0090.00314.54
5.6.290.0060.00614.16
5.6.280.0060.03617.39
5.6.270.0030.01013.78
5.6.260.0040.00714.06
5.6.250.0040.00414.30
5.6.240.0030.01314.63
5.6.230.0060.00314.34
5.6.220.0030.00614.50
5.6.210.0070.03817.25
5.6.200.0080.04016.11
5.6.190.0060.03617.36
5.6.180.0190.04017.46
5.6.170.0180.04017.46
5.6.160.0100.04517.39
5.6.150.0080.02116.30
5.6.140.0120.02916.21
5.6.130.0100.02016.07
5.6.120.0100.04517.56
5.6.110.0110.04017.82
5.6.100.0080.04517.59
5.6.90.0000.03617.65
5.6.80.0040.02317.31
5.6.70.0060.00614.19
5.6.60.0110.00014.35
5.6.50.0080.00414.39
5.6.40.0000.01414.31
5.6.30.0040.01114.13
5.6.20.0000.01114.39
5.6.10.0040.00814.27
5.6.00.0070.01013.87
5.5.380.0030.00711.18
5.5.370.0070.00311.23
5.5.360.0070.00011.18
5.5.350.1250.02115.83
5.5.340.0050.04214.55
5.5.330.0050.04015.77
5.5.320.0140.02215.79
5.5.310.0170.01715.74
5.5.300.0030.02014.59
5.5.290.0080.02714.58
5.5.280.0060.03816.01
5.5.270.0000.02815.91
5.5.260.0020.02516.03
5.5.250.0050.03015.93
5.5.240.0050.04015.64
5.5.230.0060.00611.18
5.5.220.0060.00611.18
5.5.210.0030.00311.18
5.5.200.0040.00411.18
5.5.190.0000.00811.18
5.5.180.0040.00811.18
5.5.170.0060.00311.18
5.5.160.0080.00411.18
5.5.150.0030.00711.18
5.5.140.0000.00711.18
5.5.130.0040.00411.18
5.5.120.0080.00311.18
5.5.110.0030.00311.18
5.5.100.0060.00311.18
5.5.90.0070.00311.18
5.5.80.0030.00711.18
5.5.70.0000.00611.18
5.5.60.0050.00311.18
5.5.50.0050.00311.18
5.5.40.0060.00611.18
5.5.30.0040.00811.18
5.5.20.0000.00511.18
5.5.10.0040.00711.18
5.5.00.0070.00311.18
5.4.450.0200.02815.26
5.4.440.0130.02915.33
5.4.430.0050.03515.32
5.4.420.0150.02715.22
5.4.410.0150.03215.18
5.4.400.0080.03015.09
5.4.390.0130.03015.06
5.4.380.0060.03114.85
5.4.370.0210.02814.95
5.4.360.0080.03514.83
5.4.350.0230.03514.83
5.4.340.0170.02914.90
5.4.330.0050.00011.18
5.4.320.0060.02511.81
5.4.310.0080.02411.81
5.4.300.0040.02311.82
5.4.290.0070.02311.81
5.4.280.0080.01811.78
5.4.270.0060.02711.76
5.4.260.0060.02411.76
5.4.250.0080.04211.76
5.4.240.0040.02811.76
5.4.230.0070.02911.75
5.4.220.0020.02311.76
5.4.210.0040.01911.76
5.4.200.0040.02411.76
5.4.190.0060.02211.75
5.4.180.0040.02511.75
5.4.170.0060.02111.76
5.4.160.0050.02011.75
5.4.150.0050.02111.75
5.4.140.0070.02011.60
5.4.130.0040.02311.59
5.4.120.0030.02411.57
5.4.110.0030.02411.57
5.4.100.0050.03211.56
5.4.90.0040.03111.56
5.4.80.0080.02611.57
5.4.70.0070.03311.56
5.4.60.0080.02911.56
5.4.50.0090.03111.56
5.4.40.0110.02811.56
5.4.30.0060.02211.56
5.4.20.0100.03111.56
5.4.10.0070.02911.56
5.4.00.0080.02611.30
5.3.290.0060.02411.99
5.3.280.0120.04311.94
5.3.270.0110.03811.95
5.3.260.0060.02711.95
5.3.250.0040.02911.95
5.3.240.0060.02511.95
5.3.230.0060.04011.94
5.3.220.0070.03311.93
5.3.210.0070.03111.93
5.3.200.0090.03711.93
5.3.190.0060.03211.92
5.3.180.0070.03611.92
5.3.170.0060.03211.92
5.3.160.0050.02811.93
5.3.150.0070.03911.92
5.3.140.0050.02611.92
5.3.130.0080.02511.92
5.3.120.0050.03611.92
5.3.110.0040.02811.92
5.3.100.0080.02211.65
5.3.90.0070.02411.63
5.3.80.0050.02211.63
5.3.70.0060.02211.63
5.3.60.0030.02411.62
5.3.50.0050.02111.59
5.3.40.0040.02411.59
5.3.30.0060.01911.56
5.3.20.0070.01911.46
5.3.10.0040.02111.44
5.3.00.0060.02211.43
5.2.170.0040.01710.18
5.2.160.0050.01810.18
5.2.150.0020.02410.18
5.2.140.0040.02110.18
5.2.130.0060.01910.16
5.2.120.0030.02710.16
5.2.110.0060.03110.16
5.2.100.0060.02110.16
5.2.90.0060.01910.16
5.2.80.0020.02310.16
5.2.70.0050.02210.16
5.2.60.0100.01810.14
5.2.50.0080.02010.12
5.2.40.0040.02010.12
5.2.30.0050.02410.10
5.2.20.0080.02310.09
5.2.10.0080.02310.05
5.2.00.0060.0259.98
5.1.60.0060.0299.62
5.1.50.0070.0329.62
5.1.40.0060.0249.61
5.1.30.0050.0189.79
5.1.20.0090.0229.79
5.1.10.0040.0339.66
5.1.00.0060.0259.66
5.0.50.0040.0168.90
5.0.40.0060.0178.83
5.0.30.0040.0198.73
5.0.20.0060.0188.72
5.0.10.0030.0228.71
5.0.00.0050.0298.70
4.4.90.0030.0147.98
4.4.80.0040.0137.96
4.4.70.0040.0127.96
4.4.60.0020.0137.97
4.4.50.0040.0147.97
4.4.40.0010.0217.94
4.4.30.0060.0127.97
4.4.20.0020.0178.01
4.4.10.0050.0228.01
4.4.00.0020.0287.96
4.3.110.0020.0147.92
4.3.100.0040.0207.92
4.3.90.0020.0157.90
4.3.80.0020.0217.88
4.3.70.0050.0107.90
4.3.60.0050.0147.90
4.3.50.0040.0147.90
4.3.40.0020.0207.86
4.3.30.0020.0157.23
4.3.20.0050.0137.22
4.3.10.0040.0137.20
4.3.00.0030.0139.21

preferences:
44.88 ms | 400 KiB | 5 Q