3v4l.org

run code in 300+ PHP versions simultaneously
<?php $result = "°Freen\x18 ew°\x90ɮ\xc2"; //$result = trim($result,"\xc2"/*"\xa0"*/); //echo preg_replace('#[\x00-\x1F\x7F-\x9F]#S', '', $result); $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.0030.01418.55
8.3.50.0090.01022.05
8.3.40.0100.01018.97
8.3.30.0070.00718.97
8.3.20.0050.00318.91
8.3.10.0000.00821.05
8.3.00.0070.00021.90
8.2.180.0040.01118.43
8.2.170.0040.01522.96
8.2.160.0070.00720.39
8.2.150.0060.00324.18
8.2.140.0040.00424.66
8.2.130.0050.00226.16
8.2.120.0050.00321.16
8.2.110.0040.00422.42
8.2.100.0090.00318.03
8.2.90.0000.00719.21
8.2.80.0060.00317.97
8.2.70.0050.00517.75
8.2.60.0050.00318.04
8.2.50.0090.00019.35
8.2.40.0060.00318.22
8.2.30.0050.00219.37
8.2.20.0060.00317.84
8.2.10.0040.00417.85
8.2.00.0040.00417.86
8.1.280.0090.00625.92
8.1.270.0000.00823.99
8.1.260.0080.00026.35
8.1.250.0050.00328.09
8.1.240.0060.00322.29
8.1.230.0050.00521.04
8.1.220.0000.00818.77
8.1.210.0060.00318.91
8.1.200.0060.00317.35
8.1.190.0000.00717.41
8.1.180.0030.00518.10
8.1.170.0030.00518.47
8.1.160.0040.00418.90
8.1.150.0040.00418.69
8.1.140.0070.00017.45
8.1.130.0030.00317.86
8.1.120.0040.00417.46
8.1.110.0000.00717.61
8.1.100.0000.00817.43
8.1.90.0070.00017.43
8.1.80.0040.00417.59
8.1.70.0000.00717.43
8.1.60.0030.00917.70
8.1.50.0050.00317.54
8.1.40.0000.00817.57
8.1.30.0030.00617.63
8.1.20.0050.00317.64
8.1.10.0070.00017.55
8.1.00.0050.00317.61
8.0.300.0040.00320.02
8.0.290.0000.00717.18
8.0.280.0030.00318.47
8.0.270.0000.00717.19
8.0.260.0030.00517.00
8.0.250.0090.00017.07
8.0.240.0040.00417.01
8.0.230.0040.00417.04
8.0.220.0070.00016.86
8.0.210.0030.00316.90
8.0.200.0000.00617.03
8.0.190.0030.00316.87
8.0.180.0040.00416.87
8.0.170.0030.00317.01
8.0.160.0040.00416.93
8.0.150.0040.00416.92
8.0.140.0040.00716.94
8.0.130.0060.00013.39
8.0.120.0050.00317.03
8.0.110.0070.00017.00
8.0.100.0030.00516.97
8.0.90.0070.00016.76
8.0.80.0030.01717.03
8.0.70.0000.00816.95
8.0.60.0070.00016.98
8.0.50.0000.00716.85
8.0.30.0110.01017.14
8.0.20.0130.00817.40
8.0.10.0040.00416.93
8.0.00.0080.00917.11
7.4.330.0000.00516.70
7.4.320.0060.00016.75
7.4.300.0040.00416.80
7.4.290.0030.00316.65
7.4.280.0040.00416.49
7.4.270.0030.00316.75
7.4.260.0040.00413.33
7.4.250.0030.00616.67
7.4.240.0030.00316.68
7.4.230.0000.00716.66
7.4.220.0110.00716.72
7.4.210.0080.00716.65
7.4.200.0030.00316.85
7.4.190.0050.00316.84
7.4.160.0060.01216.78
7.4.150.0120.00617.40
7.4.140.0080.01017.86
7.4.130.0040.01316.75
7.4.120.0090.01116.58
7.4.110.0030.01516.78
7.4.100.0110.00616.63
7.4.90.0040.01816.47
7.4.80.0120.00419.39
7.4.70.0100.01216.79
7.4.60.0060.01016.60
7.4.50.0090.00016.36
7.4.40.0080.00822.77
7.4.30.0090.00916.56
7.4.00.0030.01015.26
7.3.330.0000.00713.14
7.3.320.0030.00313.25
7.3.310.0030.00316.39
7.3.300.0030.00616.38
7.3.290.0030.01216.30
7.3.280.0110.00816.31
7.3.270.0130.00317.40
7.3.260.0100.01218.24
7.3.250.0090.01216.39
7.3.240.0100.00716.72
7.3.230.0030.01416.39
7.3.210.0100.00716.53
7.3.200.0060.01519.39
7.3.190.0100.00716.59
7.3.180.0120.00316.20
7.3.170.0060.01016.47
7.3.160.0090.00616.43
7.3.120.0110.00014.78
7.2.330.0150.00316.66
7.2.320.0090.00916.62
7.2.310.0000.02316.80
7.2.300.0100.00716.67
7.2.290.0150.00316.64
7.2.00.0090.00619.43
7.1.100.0060.00618.36
7.1.70.0090.00617.17
7.1.60.0040.00817.38
7.1.50.0070.00317.25
7.1.00.0030.05322.35
7.0.200.0060.00916.77
7.0.140.0000.07321.93
7.0.70.0030.09319.90
7.0.60.0030.08719.96
7.0.50.0100.08020.28
7.0.40.0100.07020.00
7.0.30.0070.06720.00
7.0.20.0100.06020.08
7.0.10.0100.03720.05
7.0.00.0100.05720.16
5.6.280.0000.07720.83
5.6.220.0130.07720.58
5.6.210.0100.08020.63
5.6.200.0100.08721.03
5.6.190.0100.08021.03
5.6.180.0200.07021.02
5.6.170.0100.08021.07
5.6.160.0100.04321.02
5.6.150.0100.08721.05
5.6.140.0170.08021.01
5.6.130.0070.08720.95
5.6.120.0170.07721.09
5.6.110.0030.09321.03
5.6.100.0070.05721.09
5.6.90.0100.06321.01
5.6.80.0030.08020.32
5.6.70.0100.08020.32
5.6.60.0130.07020.29
5.6.50.0170.07320.51
5.6.40.0030.08020.40
5.6.30.0170.07320.37
5.6.20.0030.04720.52
5.6.10.0070.08320.42
5.6.00.0030.06320.29
5.5.360.0000.08020.35
5.5.350.0100.07320.45
5.5.340.0030.05320.88
5.5.330.0100.08720.79
5.5.320.0030.08020.86
5.5.310.0170.06720.77
5.5.300.0130.08020.82
5.5.290.0170.08020.88
5.5.280.0100.07320.87
5.5.270.0070.08720.89
5.5.260.0030.05020.84
5.5.250.0130.07720.61
5.5.240.0230.06720.30
5.5.230.0170.06720.20
5.5.220.0000.09020.30
5.5.210.0100.07320.02
5.5.200.0070.07720.25
5.5.190.0000.08320.27
5.5.180.0170.07320.26
5.5.160.0000.07720.13
5.5.150.0170.04320.13
5.5.140.0130.05320.22
5.5.130.0000.05320.10
5.5.120.0070.06020.23
5.5.110.0030.07320.16
5.5.100.0070.03720.09
5.5.90.0070.03720.14
5.5.80.0070.03720.14
5.5.70.0030.05019.96
5.5.60.0100.03320.08
5.5.50.0130.04720.11
5.5.40.0030.06020.05
5.5.30.0030.04020.09
5.5.20.0000.04719.98
5.5.10.0100.03720.13
5.5.00.0000.05319.96
5.4.450.0130.06019.47
5.4.440.0100.07719.30
5.4.430.0100.07019.44
5.4.420.0100.04019.39
5.4.410.0100.07719.22
5.4.400.0030.04318.93
5.4.390.0070.07319.12
5.4.380.0130.07719.03
5.4.370.0100.03719.04
5.4.360.0000.04319.07
5.4.350.0070.07718.98
5.4.340.0000.05019.25
5.4.320.0030.08318.93
5.4.310.0130.06319.14
5.4.300.0070.04319.02
5.4.290.0030.08019.04
5.4.280.0100.08018.97
5.4.270.0100.05018.82
5.4.260.0070.05318.94
5.4.250.0070.07319.02
5.4.240.0100.03318.94
5.4.230.0000.04718.97
5.4.220.0130.03019.05
5.4.210.0070.03719.14
5.4.200.0100.03019.07
5.4.190.0070.03319.10
5.4.180.0030.04018.89
5.4.170.0030.04319.09
5.4.160.0070.05719.00
5.4.150.0100.03319.05
5.4.140.0000.04016.34
5.4.130.0000.03716.43
5.4.120.0030.03316.23
5.4.110.0130.05716.31
5.4.100.0000.04016.31
5.4.90.0100.03016.50
5.4.80.0030.03716.38
5.4.70.0100.05716.30
5.4.60.0000.04016.18
5.4.50.0100.02716.41
5.4.40.0030.03716.25
5.4.30.0070.03716.23
5.4.20.0100.06316.39
5.4.10.0030.04716.17
5.4.00.0070.03715.72
5.3.290.0070.08014.61
5.3.280.0070.03714.58
5.3.270.0070.04314.48
5.3.260.0030.06714.43
5.3.250.0070.03714.58
5.3.240.0100.03014.60
5.3.230.0030.04014.45
5.3.220.0000.04014.51
5.3.210.0070.03714.57
5.3.200.0100.03314.54
5.3.190.0070.03714.55
5.3.180.0070.04014.54
5.3.170.0100.06014.52
5.3.160.0100.03014.46
5.3.150.0070.07014.54
5.3.140.0100.06714.37
5.3.130.0100.03314.38
5.3.120.0070.03714.39
5.3.110.0000.07314.48
5.3.100.0070.03313.85
5.3.90.0000.04013.87
5.3.80.0000.05713.77
5.3.70.0070.03714.00
5.3.60.0100.03313.99
5.3.50.0030.03313.95
5.3.40.0070.04713.94
5.3.30.0070.02713.88
5.3.20.0000.03713.56
5.3.10.0070.03013.56
5.3.00.0000.03713.59
5.2.170.0000.02710.93
5.2.160.0130.03311.06
5.2.150.0000.03011.19
5.2.140.0030.06011.13
5.2.130.0030.02311.06
5.2.120.0000.03010.89
5.2.110.0030.03010.93
5.2.100.0030.02311.05
5.2.90.0000.03010.95
5.2.80.0030.02711.01
5.2.70.0000.02710.95
5.2.60.0030.03311.05
5.2.50.0100.02310.89
5.2.40.0030.02311.08
5.2.30.0030.02310.96
5.2.20.0030.02711.04
5.2.10.0070.05310.92
5.2.00.0100.05310.89
5.1.60.0100.03310.89
5.1.50.0030.05310.89
5.1.40.0000.03010.89
5.1.30.0030.03710.89
5.1.20.0030.04310.89
5.1.10.0070.05710.89
5.1.00.0000.04710.89
5.0.50.0030.05010.89
5.0.40.0000.04710.89
5.0.30.0030.05710.89
5.0.20.0070.04010.89
5.0.10.0130.03010.89
5.0.00.0030.06710.89
4.4.90.0030.01010.89
4.4.80.0000.01710.89
4.4.70.0030.01310.89
4.4.60.0000.03010.89
4.4.50.0030.02010.89
4.4.40.0000.03310.89
4.4.30.0070.03010.89
4.4.20.0030.02710.89
4.4.10.0070.03310.89
4.4.00.0030.05310.89
4.3.110.0000.03010.89
4.3.100.0030.03710.89
4.3.90.0000.04010.89
4.3.80.0000.05310.89
4.3.70.0000.03310.89
4.3.60.0070.03010.89
4.3.50.0070.03310.89
4.3.40.0030.04310.89
4.3.30.0000.03710.89
4.3.20.0070.02710.89
4.3.10.0000.03310.89
4.3.00.0000.03010.89

preferences:
54.57 ms | 401 KiB | 5 Q