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}]~', '', $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.00416.75
8.3.50.0100.00616.48
8.3.40.0070.00718.77
8.3.30.0120.00318.61
8.3.20.0060.00318.94
8.3.10.0030.00519.03
8.3.00.0050.00319.51
8.2.180.0140.00716.75
8.2.170.0140.00022.96
8.2.160.0100.00719.04
8.2.150.0090.00024.18
8.2.140.0000.00924.66
8.2.130.0040.00426.16
8.2.120.0040.00419.79
8.2.110.0030.00622.24
8.2.100.0090.00319.76
8.2.90.0040.00417.88
8.2.80.0030.00718.91
8.2.70.0060.00318.04
8.2.60.0040.00418.03
8.2.50.0040.00418.10
8.2.40.0040.00419.30
8.2.30.0000.00719.29
8.2.20.0030.00517.63
8.2.10.0040.00417.89
8.2.00.0100.00017.95
8.1.280.0110.01125.92
8.1.270.0040.00423.99
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0040.00422.12
8.1.230.0080.00417.71
8.1.220.0000.00817.74
8.1.210.0000.00918.77
8.1.200.0060.00317.38
8.1.190.0050.00317.35
8.1.180.0060.00318.10
8.1.170.0030.00518.78
8.1.160.0050.00219.01
8.1.150.0050.00218.64
8.1.140.0030.00617.47
8.1.130.0080.00019.33
8.1.120.0000.00717.52
8.1.110.0030.00517.44
8.1.100.0030.00317.55
8.1.90.0070.00017.54
8.1.80.0040.00417.45
8.1.70.0040.00417.53
8.1.60.0040.00417.71
8.1.50.0030.00617.42
8.1.40.0080.00017.52
8.1.30.0000.00917.71
8.1.20.0050.00517.78
8.1.10.0000.00717.64
8.1.00.0030.00617.48
8.0.300.0040.00418.77
8.0.290.0060.00316.88
8.0.280.0030.00318.38
8.0.270.0040.00417.37
8.0.260.0000.00716.97
8.0.250.0070.00317.03
8.0.240.0030.00517.02
8.0.230.0000.00717.09
8.0.220.0040.00416.98
8.0.210.0000.00817.02
8.0.200.0050.00217.08
8.0.190.0000.00716.93
8.0.180.0060.00316.95
8.0.170.0080.00317.02
8.0.160.0000.00716.91
8.0.150.0060.00316.87
8.0.140.0070.00016.93
8.0.130.0030.00313.47
8.0.120.0030.00616.94
8.0.110.0050.00216.90
8.0.100.0040.00416.85
8.0.90.0080.00016.93
8.0.80.0100.01017.04
8.0.70.0070.00016.93
8.0.60.0040.00417.03
8.0.50.0040.00416.88
8.0.30.0140.00417.13
8.0.20.0090.01017.12
8.0.10.0070.00017.14
8.0.00.0090.01216.94
7.4.330.0080.00013.14
7.4.320.0060.00016.71
7.4.300.0000.00716.67
7.4.290.0040.00816.68
7.4.280.0050.00316.58
7.4.270.0030.00416.57
7.4.260.0000.00513.50
7.4.250.0050.00316.63
7.4.240.0000.00816.68
7.4.230.0030.00316.84
7.4.220.0030.01716.71
7.4.210.0030.01216.83
7.4.200.0040.00416.46
7.4.190.0030.00616.92
7.4.160.0070.01016.73
7.4.150.0090.00916.85
7.4.140.0150.00917.86
7.4.130.0100.01616.72
7.4.120.0030.01516.75
7.4.110.0070.01116.66
7.4.100.0140.01016.66
7.4.90.0140.00316.56
7.4.80.0120.00619.39
7.4.70.0040.01916.59
7.4.60.0100.00616.49
7.4.50.0050.00016.55
7.4.40.0030.01316.42
7.4.30.0120.00416.75
7.4.00.0130.00514.98
7.3.330.0030.00313.18
7.3.320.0060.00013.19
7.3.310.0030.00316.32
7.3.300.0030.00316.26
7.3.290.0080.00816.37
7.3.280.0030.01916.43
7.3.270.0140.00316.35
7.3.260.0070.01216.58
7.3.240.0090.01316.79
7.3.230.0030.01416.24
7.3.210.0100.00616.46
7.3.200.0040.01316.45
7.3.190.0030.01216.58
7.3.180.0090.00616.54
7.3.170.0060.01316.73
7.3.160.0060.00916.63
7.3.120.0070.00815.15
7.3.110.0040.01414.85
7.3.100.0090.00914.89
7.3.90.0090.00415.03
7.3.80.0070.00715.09
7.3.70.0100.00314.96
7.3.60.0140.00014.68
7.3.50.0040.00714.94
7.3.40.0070.00314.90
7.3.30.0070.00314.98
7.3.20.0080.00816.48
7.3.10.0090.00916.49
7.3.00.0060.01016.27
7.2.330.0090.01316.59
7.2.320.0120.00616.84
7.2.310.0110.00716.74
7.2.300.0080.00816.69
7.2.290.0070.01016.68
7.2.250.0110.00714.95
7.2.240.0070.01315.18
7.2.230.0000.01515.01
7.2.220.0040.01115.23
7.2.210.0100.00715.21
7.2.200.0060.00615.16
7.2.190.0000.00915.03
7.2.180.0140.00014.84
7.2.170.0030.00615.21
7.2.130.0120.00816.64
7.2.120.0030.01316.53
7.2.110.0210.00316.35
7.2.100.0100.00516.48
7.2.90.0120.01216.51
7.2.80.0180.00017.06
7.2.70.0090.00916.66
7.2.60.0140.00716.84
7.2.50.0200.00616.52
7.2.40.0150.00617.01
7.2.30.0090.00916.73
7.2.20.0160.00316.68
7.2.10.0110.00816.82
7.2.00.0090.00616.88
7.1.330.0070.00716.05
7.1.320.0050.00515.80
7.1.310.0040.01516.05
7.1.300.0090.00616.11
7.1.290.0000.00915.76
7.1.280.0040.00715.61
7.1.270.0100.00315.96
7.1.260.0100.00615.96
7.1.250.0130.01015.45
7.1.100.0070.00418.51
7.1.70.0040.00417.32
7.1.60.0060.01819.25
7.1.50.0080.00517.17
7.1.00.0030.03322.38
7.0.200.0040.01116.84
7.0.140.0000.07721.92
7.0.120.0030.07022.15
7.0.60.0030.08719.96
7.0.50.0130.07717.92
7.0.40.0070.05720.40
7.0.30.0330.07020.32
7.0.20.0330.07720.02
7.0.10.0300.04720.13
7.0.00.0100.08020.21
5.6.280.0030.07320.98
5.6.210.0000.04320.59
5.6.200.0130.08018.18
5.6.190.0170.06320.41
5.6.180.0300.08020.54
5.6.170.0170.06320.71
5.6.160.0000.06320.49
5.6.150.0100.07018.16
5.6.140.0070.04718.21
5.6.130.0070.08318.18
5.6.120.0000.04720.89
5.6.110.0070.04021.12
5.6.100.0130.07720.88
5.6.90.0100.07020.84
5.6.80.0100.07020.43
5.6.70.4370.03720.37
5.5.350.0170.08020.45
5.5.340.0070.05017.91
5.5.330.0130.08720.25
5.5.320.0270.03720.21
5.5.310.0070.05020.26
5.5.300.0030.04017.98
5.5.290.0100.08018.02
5.5.280.0030.04320.73
5.5.270.0200.07020.84
5.5.260.0070.08720.76
5.5.250.0030.07720.68
5.5.240.0070.05320.36
5.4.450.0100.07319.42
5.4.440.0100.04019.50
5.4.430.0070.03719.46
5.4.420.0070.04019.40
5.4.410.0030.07319.27
5.4.400.0000.04719.18
5.4.390.0070.07319.07
5.4.380.0030.04318.92
5.4.370.0100.04718.77
5.4.360.0070.04019.11
5.4.350.0070.05019.12
5.4.340.0030.04019.11
5.4.320.0030.05319.12
5.4.310.0070.06719.12
5.4.300.0030.03718.80
5.4.290.0030.05319.07
5.4.280.0100.06019.17
5.4.270.0070.05319.13
5.4.260.0030.04718.78
5.4.250.0030.07719.13
5.4.240.0070.04018.99
5.4.230.0070.06019.07
5.4.220.0130.07318.82
5.4.210.0130.07018.79
5.4.200.0100.05719.07
5.4.190.0070.03718.80
5.4.180.0000.04319.17
5.4.170.0100.07319.16
5.4.160.0030.06718.90
5.4.150.0100.04318.98
5.4.140.0070.06016.40
5.4.130.0000.04316.24
5.4.120.0000.04316.27
5.4.110.0100.06016.47
5.4.100.0030.04716.29
5.4.90.0100.04716.29
5.4.80.0030.03716.36
5.4.70.0000.07316.43
5.4.60.0030.07016.25
5.4.50.0000.04016.24
5.4.40.0000.04016.23
5.4.30.0000.05316.11
5.4.20.0070.03716.27
5.4.10.0070.06716.21
5.4.00.0130.04315.81
5.3.290.0070.04014.58
5.3.280.0100.04314.50
5.3.270.0170.05714.55
5.3.260.0030.04314.55
5.3.250.0000.04014.41
5.3.240.0070.08014.54
5.3.230.0070.07014.49
5.3.220.0070.06014.35
5.3.210.0130.06314.51
5.3.200.0000.04314.49
5.3.190.0000.04714.49
5.3.180.0030.04014.43
5.3.170.0130.07314.48
5.3.160.0070.06314.52
5.3.150.0000.08314.50
5.3.140.0070.04714.47
5.3.130.0070.03714.47
5.3.120.0030.03714.33
5.3.110.0000.04014.52
5.3.100.0030.04013.95
5.3.90.0100.05013.94
5.3.80.0000.04013.99
5.3.70.0070.05013.94
5.3.60.0100.04013.95
5.3.50.0030.05713.73
5.3.40.0030.05013.88
5.3.30.0100.04713.74
5.3.20.0100.03713.62
5.3.10.0100.05013.47
5.3.00.0130.05313.46
5.2.170.0100.03011.08
5.2.160.0070.05711.15
5.2.150.0030.03311.00
5.2.140.0000.03311.02
5.2.130.0030.03711.08
5.2.120.0100.03011.05
5.2.110.0030.04011.00
5.2.100.0000.03311.03
5.2.90.0070.05311.18
5.2.80.0300.02310.91
5.2.70.0000.04011.09
5.2.60.0000.04011.02
5.2.50.0000.04310.90
5.2.40.0070.03310.95
5.2.30.0030.03310.95
5.2.20.0000.03010.89
5.2.10.0000.03010.90
5.2.00.0000.03710.70
5.1.60.0000.02710.14
5.1.50.0100.02710.04
5.1.40.0030.0279.89
5.1.30.0000.03010.32
5.1.20.0000.03710.35
5.1.10.0030.04010.06
5.1.00.0000.03710.06
5.0.50.0030.0208.49
5.0.40.0000.0478.40
5.0.30.0030.0408.12
5.0.20.0030.0308.24
5.0.10.0000.0238.07
5.0.00.0030.0338.12
4.4.90.0030.0238.03
4.4.80.0000.0238.03
4.4.70.0030.0208.03
4.4.60.0070.0338.03
4.4.50.0070.0108.03
4.4.40.0070.0508.03
4.4.30.0000.0238.03
4.4.20.0030.0138.03
4.4.10.0000.0378.03
4.4.00.0000.0308.03
4.3.110.0000.0278.03
4.3.100.0030.0278.03
4.3.90.0030.0338.03
4.3.80.0070.0378.03
4.3.70.0030.0278.03
4.3.60.0030.0208.03
4.3.50.0000.0278.03
4.3.40.0000.0238.03
4.3.30.0000.0178.03
4.3.20.0000.0238.03
4.3.10.0030.0138.03
4.3.00.0000.0178.03

preferences:
68.02 ms | 401 KiB | 5 Q