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.0060.00916.88
8.3.50.0120.00917.39
8.3.40.0090.00618.96
8.3.30.0140.00018.79
8.3.20.0080.00018.85
8.3.10.0080.00019.05
8.3.00.0060.00319.23
8.2.180.0110.01116.63
8.2.170.0120.00322.96
8.2.160.0040.01119.09
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0120.00426.16
8.2.120.0000.00721.04
8.2.110.0070.00321.14
8.2.100.0090.00317.91
8.2.90.0040.00419.34
8.2.80.0040.00419.47
8.2.70.0000.00917.75
8.2.60.0030.00517.91
8.2.50.0040.00418.07
8.2.40.0040.00418.22
8.2.30.0040.00418.13
8.2.20.0030.00617.83
8.2.10.0040.00417.89
8.2.00.0030.00517.77
8.1.280.0110.00425.92
8.1.270.0070.00023.99
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0040.00422.50
8.1.230.0090.00321.03
8.1.220.0030.00617.74
8.1.210.0040.00418.96
8.1.200.0030.00617.35
8.1.190.0040.00417.40
8.1.180.0000.00818.10
8.1.170.0080.00018.72
8.1.160.0040.00418.71
8.1.150.0030.00618.67
8.1.140.0000.00817.53
8.1.130.0030.00317.90
8.1.120.0000.00717.42
8.1.110.0040.00317.43
8.1.100.0040.00417.59
8.1.90.0030.00617.45
8.1.80.0050.00217.55
8.1.70.0040.00417.50
8.1.60.0000.00717.66
8.1.50.0050.00317.54
8.1.40.0060.00317.61
8.1.30.0000.00917.80
8.1.20.0030.00617.79
8.1.10.0080.00017.62
8.1.00.0080.00017.55
8.0.300.0070.00020.04
8.0.290.0050.00216.88
8.0.280.0030.00318.53
8.0.270.0000.00817.28
8.0.260.0060.00016.97
8.0.250.0000.00717.14
8.0.240.0000.00717.01
8.0.230.0000.00817.04
8.0.220.0000.00817.03
8.0.210.0000.00616.86
8.0.200.0030.00317.05
8.0.190.0030.00517.08
8.0.180.0080.00316.99
8.0.170.0000.00916.88
8.0.160.0040.00416.91
8.0.150.0050.00516.81
8.0.140.0000.00816.91
8.0.130.0030.00313.44
8.0.120.0040.00416.98
8.0.110.0050.00216.95
8.0.100.0030.00516.96
8.0.90.0070.00016.86
8.0.80.0030.01316.96
8.0.70.0000.00716.98
8.0.60.0000.00816.96
8.0.50.0000.00716.98
8.0.30.0090.00917.13
8.0.20.0110.00817.22
8.0.10.0070.00016.97
8.0.00.0130.00716.94
7.4.330.0050.00013.07
7.4.320.0000.00616.73
7.4.300.0000.00716.61
7.4.290.0030.00316.66
7.4.280.0040.00416.68
7.4.270.0000.00816.65
7.4.260.0000.00613.38
7.4.250.0040.00416.78
7.4.240.0000.00716.80
7.4.230.0050.00216.49
7.4.220.0110.00616.61
7.4.210.0090.00616.78
7.4.200.0030.00316.82
7.4.190.0050.00316.89
7.4.160.0030.01216.55
7.4.150.0150.00316.64
7.4.140.0100.00716.58
7.4.130.0070.01116.57
7.4.120.0120.00916.68
7.4.110.0090.01216.82
7.4.100.0100.00716.61
7.4.90.0190.00316.75
7.4.80.0090.01219.39
7.4.70.0070.01016.54
7.4.60.0100.00716.57
7.4.50.0000.00916.48
7.4.40.0060.01216.46
7.4.30.0120.00316.68
7.4.00.0030.01315.07
7.3.330.0030.00313.22
7.3.320.0050.00313.21
7.3.310.0030.00316.18
7.3.300.0000.00716.39
7.3.290.0070.00716.33
7.3.280.0110.00616.33
7.3.270.0110.00616.35
7.3.260.0120.00416.30
7.3.250.0160.00316.72
7.3.240.0120.00616.43
7.3.230.0090.00916.48
7.3.210.0080.00816.55
7.3.200.0130.00316.35
7.3.190.0120.00416.42
7.3.180.0140.00616.49
7.3.170.0060.01316.34
7.3.160.0100.00716.41
7.3.120.0080.00614.63
7.2.330.0120.00616.66
7.2.320.0150.00716.92
7.2.310.0130.00616.72
7.2.300.0060.01116.64
7.2.290.0040.01516.76
7.1.70.0000.00717.40
7.1.60.0070.01719.30
7.1.50.0070.01617.14
7.1.00.0070.03322.32
7.0.200.0070.00416.42
7.0.140.0000.07722.21
7.0.120.0070.05722.05
7.0.60.0130.07019.93
7.0.50.0070.04017.85
7.0.40.0070.05020.21
7.0.30.0370.04720.04
7.0.20.0270.08020.35
7.0.10.0400.06320.14
7.0.00.0030.05020.14
5.6.280.0030.07021.01
5.6.210.0200.06720.49
5.6.200.0100.08318.12
5.6.190.0070.08720.49
5.6.180.0300.07720.39
5.6.170.0230.05720.45
5.6.160.0130.05720.50
5.6.150.0130.07018.08
5.6.140.0100.04318.12
5.6.130.0070.07718.15
5.6.120.0070.07020.98
5.6.110.0100.05321.00
5.6.100.0200.06720.97
5.6.90.0100.08720.96
5.6.80.0100.03320.38
5.6.70.0230.03720.38
5.5.350.0330.05320.46
5.5.340.0100.05317.98
5.5.330.0030.04020.38
5.5.320.0130.07320.40
5.5.310.0100.04720.29
5.5.300.0100.04717.89
5.5.290.0130.03018.01
5.5.280.0070.07320.68
5.5.270.0100.04320.79
5.5.260.0030.05720.64
5.5.250.0070.06720.60
5.5.240.0070.07020.34
5.4.450.0130.07319.41
5.4.440.0030.07719.24
5.4.430.0100.03319.32
5.4.420.0070.05019.39
5.4.410.0070.05319.37
5.4.400.0070.07719.15
5.4.390.0130.04019.05
5.4.380.0100.07319.18
5.4.370.0170.03719.14
5.4.360.0070.04018.79
5.4.350.0100.05019.18
5.4.340.0130.06719.13
5.4.320.0100.05719.08
5.4.310.0070.05019.14
5.4.300.0030.04719.11
5.4.290.0000.06719.00
5.4.280.0070.03719.14
5.4.270.0100.07718.91
5.4.260.0070.04019.11
5.4.250.0030.08718.80
5.4.240.0170.06718.78
5.4.230.0070.05319.14
5.4.220.0030.05319.07
5.4.210.0100.08019.11
5.4.200.0000.08019.13
5.4.190.0030.08319.11
5.4.180.0100.04319.13
5.4.170.0030.08319.11
5.4.160.0070.08018.76
5.4.150.0070.07719.12
5.4.140.0070.05716.35
5.4.130.0070.06316.28
5.4.120.0030.04016.25
5.4.110.0070.03716.34
5.4.100.0000.04016.36
5.4.90.0100.03016.24
5.4.80.0100.03716.29
5.4.70.0030.06716.39
5.4.60.0100.07016.39
5.4.50.0100.05316.33
5.4.40.0100.07016.12
5.4.30.0070.04316.25
5.4.20.0130.06716.32
5.4.10.0100.05716.20
5.4.00.0030.07715.70
5.3.290.0030.06014.56
5.3.280.0100.03314.53
5.3.270.0030.07014.54
5.3.260.0030.07714.57
5.3.250.0100.06714.50
5.3.240.0030.05014.54
5.3.230.0130.04014.57
5.3.220.0100.03714.35
5.3.210.0000.04314.48
5.3.200.0070.04714.54
5.3.190.0070.04714.50
5.3.180.0000.04014.44
5.3.170.0100.07014.50
5.3.160.0130.06014.51
5.3.150.0100.07314.48
5.3.140.0030.06314.48
5.3.130.0130.06314.46
5.3.120.0130.07314.46
5.3.110.0070.07014.63
5.3.100.0100.03313.98
5.3.90.0070.06013.95
5.3.80.0030.07713.96
5.3.70.0170.06314.05
5.3.60.0100.04313.93
5.3.50.0000.04713.76
5.3.40.0030.07013.87
5.3.30.0130.03713.87
5.3.20.0070.07013.63
5.3.10.0030.03713.49
5.3.00.0000.04013.56
5.2.170.0070.06011.04
5.2.160.0030.05711.05
5.2.150.0170.05011.07
5.2.140.0030.06711.07
5.2.130.0200.02711.03
5.2.120.0000.06311.00
5.2.110.0000.03311.02
5.2.100.0030.04311.00
5.2.90.0100.03711.00
5.2.80.0100.03010.94
5.2.70.0030.03011.02
5.2.60.0000.03310.97
5.2.50.0030.03010.94
5.2.40.0000.03010.99
5.2.30.0070.03010.98
5.2.20.0070.02310.89
5.2.10.0000.03310.86
5.2.00.0000.06710.74
5.1.60.0070.0309.89
5.1.50.0130.04710.04
5.1.40.0100.0379.92
5.1.30.0030.03710.21
5.1.20.0000.06010.34
5.1.10.0000.0339.91
5.1.00.0000.04310.05
5.0.50.0000.0338.40
5.0.40.0000.0508.30
5.0.30.0070.0608.26
5.0.20.0000.0378.21
5.0.10.0030.0408.31
5.0.00.0030.0578.14
4.4.90.0000.0177.86
4.4.80.0000.0177.86
4.4.70.0030.0137.86
4.4.60.0070.0307.86
4.4.50.0000.0177.86
4.4.40.0030.0307.86
4.4.30.0000.0377.86
4.4.20.0030.0237.86
4.4.10.0000.0237.86
4.4.00.0000.0407.86
4.3.110.0000.0377.86
4.3.100.0000.0407.86
4.3.90.0070.0307.86
4.3.80.0000.0477.86
4.3.70.0000.0337.86
4.3.60.0070.0237.86
4.3.50.0030.0237.86
4.3.40.0030.0407.86
4.3.30.0000.0207.86
4.3.20.0000.0377.86
4.3.10.0000.0307.86
4.3.00.0030.0277.86

preferences:
49.35 ms | 401 KiB | 5 Q