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]((?![\x80-\xBF])|[\x80-\xBF]{2,})~', '', $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.0090.00616.88
8.3.50.0110.00917.60
8.3.40.0150.00318.95
8.3.30.0140.00718.82
8.3.20.0050.00318.76
8.3.10.0080.00020.83
8.3.00.0050.00519.50
8.2.180.0100.01016.63
8.2.170.0090.00918.91
8.2.160.0110.00722.96
8.2.150.0030.00524.18
8.2.140.0070.00724.66
8.2.130.0110.00426.16
8.2.120.0050.00319.40
8.2.110.0030.00621.09
8.2.100.0090.00318.03
8.2.90.0000.01021.20
8.2.80.0040.00417.80
8.2.70.0030.00617.75
8.2.60.0030.00617.80
8.2.50.0030.00618.07
8.2.40.0000.00818.16
8.2.30.0020.00518.04
8.2.20.0000.00717.87
8.2.10.0040.00417.87
8.2.00.0080.00017.80
8.1.280.0060.00925.92
8.1.270.0080.00023.99
8.1.260.0090.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00620.75
8.1.230.0110.00020.82
8.1.220.0080.00017.74
8.1.210.0040.00418.93
8.1.200.0100.00017.35
8.1.190.0040.00417.29
8.1.180.0030.00718.10
8.1.170.0090.00018.76
8.1.160.0040.00418.90
8.1.150.0040.00418.77
8.1.140.0040.00417.54
8.1.130.0030.00317.85
8.1.120.0040.00417.56
8.1.110.0040.00417.54
8.1.100.0050.00217.57
8.1.90.0000.00717.54
8.1.80.0000.00717.58
8.1.70.0030.00317.45
8.1.60.0030.00617.56
8.1.50.0020.00517.47
8.1.40.0080.00017.63
8.1.30.0040.00417.69
8.1.20.0040.00417.66
8.1.10.0040.00417.57
8.1.00.0040.00417.57
8.0.300.0050.00219.89
8.0.290.0040.00416.75
8.0.280.0030.00318.46
8.0.270.0070.00017.26
8.0.260.0000.00716.96
8.0.250.0040.00417.13
8.0.240.0030.00317.07
8.0.230.0030.00316.97
8.0.220.0060.00316.98
8.0.210.0000.00716.95
8.0.200.0040.00417.05
8.0.190.0000.00817.05
8.0.180.0000.00716.89
8.0.170.0000.00817.00
8.0.160.0030.00417.02
8.0.150.0060.00316.81
8.0.140.0080.00016.92
8.0.130.0030.00313.45
8.0.120.0000.00716.96
8.0.110.0030.00516.81
8.0.100.0000.00817.01
8.0.90.0000.00717.02
8.0.80.0110.00416.93
8.0.70.0080.00016.99
8.0.60.0000.00816.87
8.0.50.0030.00517.03
8.0.30.0100.00917.10
8.0.20.0140.00417.38
8.0.10.0090.00017.13
8.0.00.0120.01216.79
7.4.330.0050.00013.15
7.4.320.0040.00416.56
7.4.300.0000.00716.67
7.4.290.0040.00416.74
7.4.280.0040.00416.69
7.4.270.0030.00516.75
7.4.260.0000.00513.35
7.4.250.0040.00416.77
7.4.240.0030.00316.59
7.4.230.0000.00816.78
7.4.220.0100.01016.52
7.4.210.0060.01216.77
7.4.200.0060.00316.82
7.4.190.0000.00716.60
7.4.160.0030.01416.63
7.4.150.0060.01216.39
7.4.140.0150.00816.75
7.4.130.0090.00916.60
7.4.120.0090.00916.59
7.4.110.0060.01116.68
7.4.100.0140.00416.63
7.4.90.0100.00716.71
7.4.80.0120.00619.39
7.4.70.0110.00716.61
7.4.60.0150.00416.61
7.4.50.0040.00416.61
7.4.40.0060.00616.52
7.4.30.0000.01716.74
7.4.00.0030.01014.66
7.3.330.0000.00613.15
7.3.320.0060.00413.34
7.3.310.0000.00716.40
7.3.300.0030.00316.25
7.3.290.0170.00616.35
7.3.280.0070.00716.38
7.3.270.0100.01416.79
7.3.260.0100.01316.42
7.3.250.0140.00316.54
7.3.240.0160.00616.30
7.3.230.0130.00316.41
7.3.210.0040.01416.55
7.3.200.0100.00616.30
7.3.190.0140.00316.73
7.3.180.0040.01216.43
7.3.170.0030.01416.82
7.3.160.0160.00616.60
7.3.120.0090.00615.25
7.2.330.0160.01016.76
7.2.320.0100.01316.72
7.2.310.0040.01816.59
7.2.300.0030.01216.64
7.2.290.0090.01216.48
7.2.00.0000.01119.70
7.1.100.1000.00712.16
7.1.70.0030.00617.29
7.1.60.0060.01919.40
7.1.50.0060.01617.14
7.1.00.0000.07322.35
7.0.200.0230.00315.02
7.0.140.0070.07022.09
7.0.120.0030.06322.06
7.0.60.0170.07719.89
7.0.50.0100.07717.83
7.0.40.0030.06720.25
7.0.30.0170.04320.11
7.0.20.0270.08320.31
7.0.10.0270.07020.24
7.0.00.0070.06020.19
5.6.280.0000.07721.05
5.6.210.0130.08020.72
5.6.200.0030.04018.16
5.6.190.0100.06720.55
5.6.180.0400.07020.64
5.6.170.0270.08720.53
5.6.160.0070.05020.41
5.6.150.0070.04018.19
5.6.140.0100.08718.16
5.6.130.0000.08018.20
5.6.120.0030.04721.04
5.6.110.0070.04320.88
5.6.100.0030.06320.97
5.6.90.0030.06021.09
5.6.80.0230.07020.35
5.6.70.4400.03720.37
5.5.350.0200.04020.42
5.5.340.0100.08317.98
5.5.330.0030.04320.43
5.5.320.0230.04720.25
5.5.310.0270.07320.14
5.5.300.0030.04018.01
5.5.290.0070.08017.91
5.5.280.0070.07020.64
5.5.270.0070.08720.64
5.5.260.0130.06320.78
5.5.250.0100.07020.57
5.5.240.0070.07320.26
5.4.450.0000.04319.50
5.4.440.0070.03719.26
5.4.430.0000.04019.48
5.4.420.0030.03719.10
5.4.410.0070.03319.27
5.4.400.0030.07719.19
5.4.390.0070.04318.79
5.4.380.0100.07018.95
5.4.370.0100.03319.08
5.4.360.0100.07019.08
5.4.350.0030.06019.18
5.4.340.0030.05019.15
5.4.320.0070.06719.09
5.4.310.0100.04319.11
5.4.300.0070.05319.14
5.4.290.0100.05018.91
5.4.280.0030.05019.14
5.4.270.0070.04319.07
5.4.260.0100.07019.17
5.4.250.0100.03719.13
5.4.240.0130.03319.16
5.4.230.0030.04018.80
5.4.220.0070.05318.80
5.4.210.0000.04019.07
5.4.200.0030.06019.15
5.4.190.0070.06019.09
5.4.180.0030.08018.80
5.4.170.0100.06018.91
5.4.160.0100.06719.15
5.4.150.0070.04718.89
5.4.140.0030.04016.34
5.4.130.0170.04716.27
5.4.120.0100.04716.25
5.4.110.0030.07316.40
5.4.100.0100.04716.28
5.4.90.0100.06716.32
5.4.80.0070.03316.59
5.4.70.0130.04316.25
5.4.60.0030.07716.32
5.4.50.0100.07716.27
5.4.40.0070.07716.20
5.4.30.0070.04316.12
5.4.20.0030.07016.32
5.4.10.0070.05016.21
5.4.00.0030.03715.93
5.3.290.0070.07314.59
5.3.280.0070.07314.51
5.3.270.0200.03314.42
5.3.260.0000.04314.54
5.3.250.0070.03314.52
5.3.240.0100.07014.61
5.3.230.0130.04014.52
5.3.220.0070.07014.57
5.3.210.0070.06714.50
5.3.200.0070.06714.54
5.3.190.0030.05014.44
5.3.180.0070.05314.48
5.3.170.0030.07714.59
5.3.160.0130.06714.65
5.3.150.0070.04714.49
5.3.140.0070.07314.50
5.3.130.0000.04314.33
5.3.120.0030.04014.47
5.3.110.0070.07014.34
5.3.100.0030.03713.85
5.3.90.0030.03713.95
5.3.80.0030.08013.94
5.3.70.0030.04013.84
5.3.60.0030.07713.92
5.3.50.0070.04713.87
5.3.40.0030.03714.03
5.3.30.0070.07313.74
5.3.20.0070.06713.65
5.3.10.0070.03713.67
5.3.00.0030.06713.45
5.2.170.0070.02711.02
5.2.160.0070.05011.13
5.2.150.0030.05011.09
5.2.140.0070.03711.08
5.2.130.0070.03010.98
5.2.120.0130.04711.10
5.2.110.0100.05711.09
5.2.100.0070.04311.18
5.2.90.0030.03311.08
5.2.80.0070.02711.11
5.2.70.0070.05310.93
5.2.60.0030.06311.03
5.2.50.0070.05710.83
5.2.40.0030.04010.87
5.2.30.0170.04710.87
5.2.20.0100.06011.12
5.2.10.0100.03711.01
5.2.00.0000.05710.79
5.1.60.0130.0439.83
5.1.50.0070.05010.07
5.1.40.0130.0479.87
5.1.30.0100.04310.34
5.1.20.0030.03710.35
5.1.10.0000.03710.13
5.1.00.0030.05010.21
5.0.50.0100.0278.49
5.0.40.0070.0308.42
5.0.30.0030.0638.20
5.0.20.0030.0438.13
5.0.10.0030.0338.15
5.0.00.0000.0638.14
4.4.90.0030.0307.80
4.4.80.0070.0307.80
4.4.70.0000.0377.80
4.4.60.0100.0207.80
4.4.50.0000.0207.80
4.4.40.0000.0537.80
4.4.30.0030.0337.80
4.4.20.0030.0207.80
4.4.10.0030.0337.80
4.4.00.0000.0537.80
4.3.110.0000.0407.80
4.3.100.0000.0337.80
4.3.90.0070.0307.80
4.3.80.0000.0537.80
4.3.70.0030.0177.80
4.3.60.0030.0307.80
4.3.50.0000.0377.80
4.3.40.0000.0407.80
4.3.30.0030.0177.80
4.3.20.0030.0137.80
4.3.10.0000.0177.80
4.3.00.0030.0337.80

preferences:
44.8 ms | 401 KiB | 5 Q