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('/[\x00-\x08\x10\x0B\x0C\x0E-\x19\x7F]'. '|[\x00-\x7F][\x80-\xBF]+'. '|([\xC0\xC1]|[\xF0-\xFF])[\x80-\xBF]*'. '|[\xC2-\xDF]((?![\x80-\xBF])|[\x80-\xBF]{2,})'. '|[\xE0-\xEF](([\x80-\xBF](?![\x80-\xBF]))|(?![\x80-\xBF]{2})|[\x80-\xBF]{3,})/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.0110.00716.88
8.3.50.0090.00816.80
8.3.40.0120.00918.82
8.3.30.0180.00418.80
8.3.20.0040.00418.89
8.3.10.0030.00620.73
8.3.00.0090.00317.71
8.2.180.0040.01216.75
8.2.170.0140.00722.96
8.2.160.0120.00621.17
8.2.150.0100.00024.18
8.2.140.0050.00324.66
8.2.130.0070.00726.16
8.2.120.0040.00419.48
8.2.110.0070.00321.17
8.2.100.0040.00818.03
8.2.90.0000.00819.24
8.2.80.0040.00417.97
8.2.70.0040.00417.63
8.2.60.0040.00417.80
8.2.50.0080.00018.10
8.2.40.0050.00320.68
8.2.30.0050.00318.13
8.2.20.0000.00817.89
8.2.10.0040.00417.97
8.2.00.0090.00417.98
8.1.280.0070.01025.92
8.1.270.0040.00424.66
8.1.260.0060.00326.35
8.1.250.0050.00528.09
8.1.240.0000.00922.11
8.1.230.0040.00717.89
8.1.220.0030.00517.91
8.1.210.0040.00418.77
8.1.200.0000.00917.36
8.1.190.0060.00317.47
8.1.180.0080.00018.10
8.1.170.0190.00018.62
8.1.160.0040.00422.20
8.1.150.0000.00918.87
8.1.140.0030.00917.64
8.1.130.0030.00317.98
8.1.120.0000.00717.59
8.1.110.0000.00717.47
8.1.100.0040.00417.57
8.1.90.0070.00017.61
8.1.80.0000.00717.59
8.1.70.0050.00217.57
8.1.60.0000.00817.69
8.1.50.0040.00417.50
8.1.40.0040.00417.65
8.1.30.0000.00817.78
8.1.20.0040.00417.79
8.1.10.0000.00817.59
8.1.00.0080.00017.52
8.0.300.0100.00018.77
8.0.290.0060.00317.00
8.0.280.0040.00418.49
8.0.270.0030.00317.31
8.0.260.0000.00717.00
8.0.250.0040.00417.14
8.0.240.0070.00017.18
8.0.230.0030.00317.13
8.0.220.0030.00617.12
8.0.210.0000.00717.03
8.0.200.0000.00817.07
8.0.190.0040.00417.04
8.0.180.0000.00817.04
8.0.170.0040.00416.91
8.0.160.0040.00417.02
8.0.150.0000.00916.94
8.0.140.0040.00816.98
8.0.130.0040.00413.46
8.0.120.0030.00617.09
8.0.110.0000.00717.04
8.0.100.0040.00417.14
8.0.90.0030.00516.90
8.0.80.0080.00716.96
8.0.70.0050.00316.92
8.0.60.0030.00517.05
8.0.50.0040.00416.94
8.0.30.0140.00817.14
8.0.20.0060.01317.19
8.0.10.0030.00717.29
8.0.00.0110.01016.89
7.4.330.0050.00013.30
7.4.320.0030.00516.75
7.4.300.0030.00316.67
7.4.290.0000.00816.73
7.4.280.0000.00716.89
7.4.270.0000.00716.77
7.4.260.0000.00613.44
7.4.250.0060.00316.82
7.4.240.0060.00216.78
7.4.230.0030.00316.59
7.4.220.0070.01416.84
7.4.210.0100.00816.78
7.4.200.0000.00716.74
7.4.190.0030.00316.66
7.4.160.0060.00916.66
7.4.150.0140.00316.70
7.4.140.0180.00516.59
7.4.130.0060.01216.59
7.4.120.0120.00516.83
7.4.110.0120.00916.74
7.4.100.0090.00916.78
7.4.90.0100.00916.73
7.4.80.0060.01219.39
7.4.70.0150.00316.66
7.4.60.0120.00416.67
7.4.50.0050.00016.48
7.4.40.0030.00916.79
7.4.30.0150.00416.79
7.4.00.0060.01014.91
7.3.330.0030.00313.23
7.3.320.0030.00313.23
7.3.310.0000.00716.25
7.3.300.0070.00016.35
7.3.290.0120.00316.43
7.3.280.0060.00916.41
7.3.270.0060.01016.63
7.3.260.0040.01216.47
7.3.250.0110.01316.42
7.3.240.0070.01316.83
7.3.230.0100.00716.40
7.3.210.0080.00816.91
7.3.200.0160.00316.83
7.3.190.0100.01016.80
7.3.180.0040.01116.47
7.3.170.0060.00916.59
7.3.160.0110.00616.75
7.3.120.0000.01115.24
7.2.330.0150.00416.70
7.2.320.0160.00616.69
7.2.310.0190.00716.74
7.2.300.0130.00316.77
7.2.290.0080.00916.67
7.2.00.0070.00719.69
7.1.100.0060.00618.50
7.1.70.0030.00617.32
7.1.60.0000.02319.40
7.1.50.0070.01317.08
7.1.00.0070.07322.48
7.0.200.0590.00714.98
7.0.140.0000.07722.13
7.0.120.0130.06322.04
7.0.60.0000.04319.79
7.0.50.0030.08017.86
7.0.40.0000.05020.25
7.0.30.0230.08020.33
7.0.20.0330.07720.23
7.0.10.0230.05320.19
7.0.00.0000.09020.19
5.6.280.0030.07321.11
5.6.210.0070.08720.76
5.6.200.0070.06018.20
5.6.190.0100.04020.43
5.6.180.0230.08320.65
5.6.170.0270.04720.49
5.6.160.0100.07720.53
5.6.150.0070.08318.07
5.6.140.0100.08018.11
5.6.130.0030.04018.16
5.6.120.0070.08020.98
5.6.110.0030.04321.03
5.6.100.0070.08720.97
5.6.90.0000.08720.98
5.6.80.0030.05720.46
5.6.70.0270.07320.34
5.5.350.0230.04320.49
5.5.340.0030.04318.02
5.5.330.0030.05720.13
5.5.320.0030.08320.30
5.5.310.0230.04020.31
5.5.300.0100.06017.91
5.5.290.0130.06317.96
5.5.280.0130.08020.89
5.5.270.0030.05320.79
5.5.260.0030.04020.86
5.5.250.0070.06020.65
5.5.240.0000.07320.27
5.4.450.0130.04319.50
5.4.440.0100.06019.55
5.4.430.0070.06019.46
5.4.420.0100.06719.24
5.4.410.0030.06319.41
5.4.400.0030.04719.09
5.4.390.0000.08318.79
5.4.380.0070.08019.17
5.4.370.0030.06018.80
5.4.360.0070.07719.20
5.4.350.0100.06319.00
5.4.340.0130.06019.00
5.4.320.0070.04019.14
5.4.310.0130.06319.15
5.4.300.0170.03019.04
5.4.290.0070.03719.17
5.4.280.0130.03719.17
5.4.270.0070.03719.11
5.4.260.0070.04019.00
5.4.250.0000.04019.15
5.4.240.0070.04019.11
5.4.230.0130.06718.78
5.4.220.0030.07019.07
5.4.210.0100.06319.15
5.4.200.0000.08318.91
5.4.190.0070.03719.01
5.4.180.0070.03718.77
5.4.170.0070.07319.14
5.4.160.0030.05019.00
5.4.150.0070.04019.16
5.4.140.0170.06016.25
5.4.130.0130.03316.34
5.4.120.0070.03316.25
5.4.110.0170.06016.15
5.4.100.0030.05316.39
5.4.90.0070.06016.27
5.4.80.0100.04316.37
5.4.70.0170.04716.39
5.4.60.0070.04316.21
5.4.50.0070.06016.23
5.4.40.0100.05016.26
5.4.30.0100.06316.33
5.4.20.0030.07316.57
5.4.10.0000.04716.38
5.4.00.0100.06315.79
5.3.290.0100.03314.54
5.3.280.0100.03714.53
5.3.270.0070.04714.52
5.3.260.0070.06714.54
5.3.250.0170.06014.54
5.3.240.0070.04314.53
5.3.230.0100.07714.52
5.3.220.0030.03714.48
5.3.210.0070.07714.51
5.3.200.0030.07314.44
5.3.190.0070.03714.52
5.3.180.0000.07014.48
5.3.170.0130.04014.34
5.3.160.0030.05014.54
5.3.150.0130.04014.39
5.3.140.0030.05014.49
5.3.130.0170.06714.48
5.3.120.0100.07714.42
5.3.110.0230.03714.48
5.3.100.0130.07013.86
5.3.90.0070.06013.97
5.3.80.0130.03313.85
5.3.70.0030.03713.95
5.3.60.0070.03313.98
5.3.50.0000.04013.88
5.3.40.0100.06313.89
5.3.30.0100.06713.84
5.3.20.0070.03713.48
5.3.10.0170.06013.59
5.3.00.0130.06713.45
5.2.170.0130.05011.13
5.2.160.0030.03011.23
5.2.150.0030.03311.09
5.2.140.0100.03011.12
5.2.130.0070.06011.03
5.2.120.0100.05310.92
5.2.110.0100.05311.25
5.2.100.0070.05311.03
5.2.90.0070.04711.03
5.2.80.0000.06011.07
5.2.70.0030.04310.97
5.2.60.0030.03711.20
5.2.50.0070.05010.94
5.2.40.0030.04311.01
5.2.30.0070.05311.06
5.2.20.0130.05010.89
5.2.10.0030.05010.86
5.2.00.0070.06010.61
5.1.60.0100.0439.94
5.1.50.0070.04710.05
5.1.40.0030.0379.88
5.1.30.0100.04710.29
5.1.20.0100.04310.38
5.1.10.0030.04710.21
5.1.00.0070.04310.08
5.0.50.0000.0508.80
5.0.40.0000.0338.80
5.0.30.0000.0708.80
5.0.20.0070.0408.80
5.0.10.0070.0408.80
5.0.00.0070.0608.80
4.4.90.0030.0308.80
4.4.80.0000.0238.80
4.4.70.0030.0338.80
4.4.60.0030.0378.80
4.4.50.0030.0208.80
4.4.40.0030.0338.80
4.4.30.0070.0278.80
4.4.20.0030.0208.80
4.4.10.0030.0238.80
4.4.00.0000.0308.80
4.3.110.0030.0338.80
4.3.100.0070.0178.80
4.3.90.0070.0308.80
4.3.80.0070.0408.80
4.3.70.0000.0208.80
4.3.60.0030.0278.80
4.3.50.0000.0238.80
4.3.40.0030.0578.80
4.3.30.0070.0308.80
4.3.20.0000.0338.80
4.3.10.0000.0178.80
4.3.00.0000.0238.80

preferences:
43.78 ms | 401 KiB | 5 Q