3v4l.org

run code in 300+ PHP versions simultaneously
<?php $result = "°Freen\x18 ew°\x90ɮ\xc2"; $result = preg_replace('~[\x{0000}-\x{001F}\x{007F}-\x{00a0}][\xC2-\xDF]~', '', $result); /* //reject overly long 2 byte sequences, as well as characters above U+10000 and replace with ? $result= preg_replace( '/[\xC2-\xDF]((?![\x80-\xBF])|[\x80-\xBF]{2,})/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.0180.00016.88
8.3.50.0080.00816.53
8.3.40.0130.00318.79
8.3.30.0090.00918.68
8.3.20.0050.00318.82
8.3.10.0050.00318.72
8.3.00.0030.00619.38
8.2.180.0090.01216.75
8.2.170.0040.01122.96
8.2.160.0060.00918.96
8.2.150.0060.00324.18
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0040.00419.66
8.2.110.0060.00322.21
8.2.100.0090.00319.64
8.2.90.0030.00617.75
8.2.80.0040.00418.90
8.2.70.0050.00517.88
8.2.60.0040.00417.75
8.2.50.0060.00317.80
8.2.40.0000.00819.73
8.2.30.0040.00417.75
8.2.20.0040.00517.63
8.2.10.0040.00418.01
8.2.00.0100.00017.81
8.1.280.0170.00325.92
8.1.270.0040.00423.99
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0030.00720.39
8.1.230.0030.00817.76
8.1.220.0080.00017.79
8.1.210.0040.00418.77
8.1.200.0000.00817.35
8.1.190.0040.00817.29
8.1.180.0050.00318.10
8.1.170.0080.00317.62
8.1.160.0000.00719.04
8.1.150.0070.00018.63
8.1.140.0000.00717.45
8.1.130.0000.00717.50
8.1.120.0070.00017.44
8.1.110.0070.00017.43
8.1.100.0030.00517.50
8.1.90.0000.00717.48
8.1.80.0040.00417.43
8.1.70.0000.00817.42
8.1.60.0090.00017.73
8.1.50.0000.00717.56
8.1.40.0080.00017.57
8.1.30.0000.00817.70
8.1.20.0040.00817.63
8.1.10.0070.00017.62
8.1.00.0000.00817.47
8.0.300.0040.00418.77
8.0.290.0000.00916.88
8.0.280.0030.00318.53
8.0.270.0000.00717.33
8.0.260.0000.00716.99
8.0.250.0000.00917.00
8.0.240.0000.00817.00
8.0.230.0030.00617.06
8.0.220.0000.00816.95
8.0.210.0000.00616.91
8.0.200.0000.00917.07
8.0.190.0000.00716.93
8.0.180.0030.00316.96
8.0.170.0000.00916.98
8.0.160.0000.00716.98
8.0.150.0050.00316.97
8.0.140.0040.00416.92
8.0.130.0030.00313.39
8.0.120.0000.00816.84
8.0.110.0000.00816.80
8.0.100.0040.00416.95
8.0.90.0040.00416.97
8.0.80.0030.01016.97
8.0.70.0070.00016.88
8.0.60.0060.00316.85
8.0.50.0080.00017.01
8.0.30.0120.00917.42
8.0.20.0090.01517.13
8.0.10.0070.00017.07
8.0.00.0090.00916.84
7.4.330.0000.00613.01
7.4.320.0040.00416.66
7.4.300.0030.00316.73
7.4.290.0000.01016.70
7.4.280.0050.00316.50
7.4.270.0030.00316.70
7.4.260.0000.00713.42
7.4.250.0080.00016.71
7.4.240.0000.00716.75
7.4.230.0000.00716.58
7.4.220.0120.00916.72
7.4.210.0060.00916.55
7.4.200.0030.00316.40
7.4.190.0040.00416.56
7.4.160.0030.01316.59
7.4.150.0110.00716.65
7.4.140.0040.01317.86
7.4.130.0060.01216.60
7.4.120.0140.00716.57
7.4.110.0000.01716.61
7.4.100.0120.00916.74
7.4.90.0100.01416.46
7.4.80.0040.01319.39
7.4.70.0130.00316.54
7.4.60.0030.01316.51
7.4.50.0060.00016.74
7.4.40.0070.00716.55
7.4.30.0030.01316.68
7.4.00.0110.00315.15
7.3.330.0030.00313.09
7.3.320.0070.00013.23
7.3.310.0000.00716.21
7.3.300.0040.00416.36
7.3.290.0160.00216.34
7.3.280.0080.00816.39
7.3.270.0220.00316.78
7.3.260.0130.01016.64
7.3.240.0030.01316.39
7.3.230.0070.01016.36
7.3.210.0090.00916.43
7.3.200.0130.00316.56
7.3.190.0030.01216.86
7.3.180.0060.00916.42
7.3.170.0060.01316.38
7.3.160.0080.01116.36
7.3.120.0040.01215.07
7.3.10.0030.00716.96
7.3.00.0030.01016.63
7.2.330.0130.00316.67
7.2.320.0150.00616.74
7.2.310.0070.01116.53
7.2.300.0110.00616.56
7.2.290.0030.01316.59
7.2.130.0030.00817.11
7.2.120.0040.00716.89
7.2.110.0070.00316.93
7.2.100.0000.01016.81
7.2.90.0060.00616.89
7.2.80.0030.01016.95
7.2.70.0080.00317.11
7.2.60.0070.00717.08
7.2.50.0030.00917.11
7.2.40.0040.00717.01
7.2.30.0000.01117.14
7.2.20.0040.00717.09
7.2.10.0040.00716.84
7.2.00.0080.00618.31
7.1.250.0030.00616.02
7.1.100.0000.01218.22
7.1.70.0030.00617.33
7.1.60.0110.01419.25
7.1.50.0100.01017.14
7.1.00.0070.06022.46
7.0.200.0000.00816.75
7.0.140.0070.07022.22
7.0.120.0030.06722.01
7.0.60.0100.06721.88
7.0.50.0100.08017.84
7.0.40.0130.03320.25
7.0.30.0200.08020.01
7.0.20.0200.04320.34
7.0.10.0170.07720.21
7.0.00.0030.06320.18
5.6.280.0000.07721.10
5.6.210.0070.08320.52
5.6.200.0030.07018.13
5.6.190.0030.08720.67
5.6.180.0200.03720.39
5.6.170.0300.07320.40
5.6.160.0100.03720.32
5.6.150.0070.08318.13
5.6.140.0030.04018.22
5.6.130.0070.08318.07
5.6.120.0000.04320.98
5.6.110.0100.06021.05
5.6.100.0070.03720.93
5.6.90.0130.07720.96
5.6.80.0030.03720.52
5.5.350.0100.08020.43
5.5.340.0030.04018.02
5.5.330.0030.04320.14
5.5.320.0400.03720.25
5.5.310.0170.04320.17
5.5.300.0030.04717.98
5.5.290.0030.04317.91
5.5.280.0030.08320.95
5.5.270.0100.06020.87
5.5.260.0030.07320.83
5.5.250.0100.04720.49
5.5.240.0170.02720.25
5.4.450.0070.07319.48
5.4.440.0030.08019.11
5.4.430.0030.04019.52
5.4.420.0100.07019.46
5.4.410.0030.05019.21
5.4.400.0100.06719.16
5.4.390.0130.07318.91
5.4.380.0070.07719.07
5.4.370.0070.03719.17
5.4.360.0070.07319.11
5.4.350.0070.07319.18
5.4.340.0070.03719.16
5.4.320.0000.06019.07
5.4.310.0030.07718.79
5.4.300.0030.08319.11
5.4.290.0100.03319.08
5.4.280.0130.08019.18
5.4.270.0070.07719.09
5.4.260.0100.07319.11
5.4.250.0030.05019.09
5.4.240.0070.04718.78
5.4.230.0070.07318.91
5.4.220.0070.07719.00
5.4.210.0100.07018.78
5.4.200.0000.07718.99
5.4.190.0030.04718.91
5.4.180.0070.07018.78
5.4.170.0070.08019.02
5.4.160.0200.04719.13
5.4.150.0000.05719.09
5.4.140.0170.05316.29
5.4.130.0070.06716.24
5.4.120.0070.07016.25
5.4.110.0070.07316.61
5.4.100.0000.07716.24
5.4.90.0030.04016.41
5.4.80.0030.07316.33
5.4.70.0000.07716.32
5.4.60.0000.04716.64
5.4.50.0200.06016.34
5.4.40.0070.05016.28
5.4.30.0100.06716.21
5.4.20.0030.06716.25
5.4.10.0000.07716.23
5.4.00.0130.07015.92
5.3.290.0070.07714.56
5.3.280.0070.07314.52
5.3.270.0100.07314.61
5.3.260.0100.05314.52
5.3.250.0070.05014.53
5.3.240.0070.05314.53
5.3.230.0070.04714.52
5.3.220.0100.07314.50
5.3.210.0030.06314.38
5.3.200.0070.07314.35
5.3.190.0130.06314.51
5.3.180.0070.04714.57
5.3.170.0070.06714.51
5.3.160.0070.04314.48
5.3.150.0030.05014.45
5.3.140.0070.06014.34
5.3.130.0130.07314.46
5.3.120.0100.07714.52
5.3.110.0030.04714.50
5.3.100.0070.04313.98
5.3.90.0030.06313.95
5.3.80.0030.05013.95
5.3.70.0100.05713.84
5.3.60.0070.07713.84
5.3.50.0070.07013.75
5.3.40.0100.07713.76
5.3.30.0170.06713.72
5.3.20.0030.07313.66
5.3.10.0130.06313.59
5.3.00.0000.04713.45
5.2.170.0100.05710.96
5.2.160.0070.06311.30
5.2.150.0030.04011.13
5.2.140.0100.05711.02
5.2.130.0100.03011.02
5.2.120.0070.06711.00
5.2.110.0070.03311.25
5.2.100.0070.02711.07
5.2.90.0030.03311.08
5.2.80.0070.06310.95
5.2.70.0100.03310.98
5.2.60.0000.03310.86
5.2.50.0100.03710.91
5.2.40.0030.04010.92
5.2.30.0070.03010.79
5.2.20.0000.03310.90
5.2.10.0030.03710.93
5.2.00.0030.06310.86
5.1.60.0030.05310.00
5.1.50.0000.0479.97
5.1.40.0070.0409.88
5.1.30.0070.04710.34
5.1.20.0070.04010.39
5.1.10.0000.03310.08
5.1.00.0070.04710.05
5.0.50.0100.0408.52
5.0.40.0030.0378.41
5.0.30.0070.0578.06
5.0.20.0030.0338.26
5.0.10.0000.0438.07
5.0.00.0000.0478.29
4.4.90.0030.0177.82
4.4.80.0030.0377.82
4.4.70.0030.0177.82
4.4.60.0000.0177.82
4.4.50.0000.0177.82
4.4.40.0000.0407.82
4.4.30.0000.0377.82
4.4.20.0000.0237.82
4.4.10.0000.0407.82
4.4.00.0070.0507.82
4.3.110.0000.0237.82
4.3.100.0030.0277.82
4.3.90.0030.0137.82
4.3.80.0030.0307.82
4.3.70.0070.0177.82
4.3.60.0030.0337.82
4.3.50.0070.0207.82
4.3.40.0070.0477.82
4.3.30.0030.0237.82
4.3.20.0070.0377.82
4.3.10.0000.0377.82
4.3.00.0070.0337.82

preferences:
49.9 ms | 401 KiB | 5 Q