3v4l.org

run code in 300+ PHP versions simultaneously
<?php $result = "°Freen\x18 ew°\x90ɮ\xa0"; //$result = trim($result,"\xc2"/*"\xa0"*/); //echo preg_replace('#[\x00-\x1F\x7F-\x9F]#S', '', $result); //echo preg_replace('~[\x{0000}-\x{001F}\x{007F}-\x{00a0}]~', '', $result); echo preg_replace('~[\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.0130.00318.30
8.3.50.0150.00717.38
8.3.40.0150.00418.75
8.3.30.0090.00618.85
8.3.20.0040.00418.86
8.3.10.0100.00018.85
8.3.00.0050.00319.50
8.2.180.0120.00316.88
8.2.170.0040.01122.96
8.2.160.0130.00318.98
8.2.150.0120.00824.18
8.2.140.0080.00024.66
8.2.130.0110.00426.16
8.2.120.0070.00020.92
8.2.110.0060.00322.20
8.2.100.0110.00019.57
8.2.90.0000.00817.63
8.2.80.0060.00318.86
8.2.70.0030.00717.88
8.2.60.0000.00817.80
8.2.50.0040.00418.07
8.2.40.0030.00618.21
8.2.30.0000.00817.72
8.2.20.0040.00417.83
8.2.10.0030.00517.80
8.2.00.0030.00717.84
8.1.280.0110.00325.92
8.1.270.0080.00023.99
8.1.260.0090.00926.35
8.1.250.0100.00728.09
8.1.240.0060.00320.48
8.1.230.0000.01217.77
8.1.220.0050.00317.74
8.1.210.0000.00918.77
8.1.200.0030.00617.36
8.1.190.0070.00017.23
8.1.180.0050.00318.10
8.1.170.0050.00518.71
8.1.160.0070.00018.96
8.1.150.0030.00518.73
8.1.140.0030.00717.59
8.1.130.0040.00417.43
8.1.120.0000.00717.45
8.1.110.0050.00317.52
8.1.100.0080.00017.56
8.1.90.0040.00417.54
8.1.80.0070.00017.54
8.1.70.0070.00017.55
8.1.60.0000.00717.71
8.1.50.0000.00817.53
8.1.40.0000.00817.54
8.1.30.0030.00517.60
8.1.20.0030.00517.76
8.1.10.0050.00217.64
8.1.00.0000.00817.62
8.0.300.0060.00318.77
8.0.290.0060.00316.75
8.0.280.0000.00718.58
8.0.270.0070.00017.29
8.0.260.0070.00016.97
8.0.250.0050.00217.13
8.0.240.0050.00317.02
8.0.230.0060.00316.96
8.0.220.0030.00516.98
8.0.210.0070.00016.88
8.0.200.0040.00417.04
8.0.190.0040.00417.01
8.0.180.0000.01016.90
8.0.170.0050.00316.93
8.0.160.0040.00416.96
8.0.150.0040.00416.90
8.0.140.0060.00316.82
8.0.130.0060.00313.41
8.0.120.0060.00316.86
8.0.110.0040.00417.09
8.0.100.0040.00416.87
8.0.90.0030.00516.85
8.0.80.0060.00916.93
8.0.70.0050.00217.00
8.0.60.0080.00016.98
8.0.50.0000.00817.02
8.0.30.0070.01017.11
8.0.20.0070.01217.10
8.0.10.0000.00716.97
8.0.00.0080.01416.80
7.4.330.0050.00013.14
7.4.320.0000.00616.63
7.4.300.0060.00016.76
7.4.290.0050.00316.70
7.4.280.0040.00416.74
7.4.270.0000.00716.80
7.4.260.0000.00613.38
7.4.250.0030.00616.67
7.4.240.0000.00716.79
7.4.230.0000.00716.76
7.4.220.0110.01416.67
7.4.210.0040.01116.72
7.4.200.0060.00316.55
7.4.190.0030.00316.82
7.4.160.0120.00316.69
7.4.150.0120.01216.82
7.4.140.0070.01116.76
7.4.130.0070.01016.57
7.4.120.0090.00916.59
7.4.110.0070.01016.51
7.4.100.0090.00916.68
7.4.90.0180.00016.63
7.4.80.0150.00619.39
7.4.70.0040.01516.76
7.4.60.0100.01016.55
7.4.50.0030.00516.53
7.4.40.0030.01416.51
7.4.30.0060.01016.56
7.4.00.0030.01015.12
7.3.330.0000.00613.12
7.3.320.0040.00413.11
7.3.310.0040.00416.22
7.3.300.0060.00016.29
7.3.290.0070.00816.29
7.3.280.0080.00716.31
7.3.270.0100.00716.43
7.3.260.0040.01416.26
7.3.250.0220.01516.52
7.3.240.0160.00016.60
7.3.230.0100.01316.69
7.3.210.0070.01016.28
7.3.200.0100.01016.61
7.3.190.0100.00516.70
7.3.180.0130.00316.57
7.3.170.0060.00916.34
7.3.160.0080.00816.35
7.3.120.0070.00714.65
7.2.330.0090.00916.71
7.2.320.0170.00016.77
7.2.310.0160.00616.61
7.2.300.0040.01416.71
7.2.290.0100.00716.43
7.2.00.0030.01019.31
7.1.200.0100.00315.92
7.1.100.0030.00818.22
7.1.70.0000.01017.23
7.1.60.0070.00417.09
7.1.50.0060.01217.19
7.1.00.0100.07022.33
7.0.200.0100.00317.02
7.0.140.0000.07322.15
7.0.120.0000.07021.95
7.0.60.0030.04319.85
7.0.50.0100.07717.84
7.0.40.0000.05020.22
7.0.30.0230.05320.11
7.0.20.0230.09020.19
7.0.10.0070.04020.19
7.0.00.0070.05020.32
5.6.210.0170.05320.74
5.6.200.0130.08318.21
5.6.190.0070.08320.33
5.6.180.0500.05720.35
5.6.170.0200.03720.47
5.6.160.0070.08720.61
5.6.150.0000.04318.22
5.6.140.0030.09018.17
5.6.130.0030.04318.11
5.6.120.0100.04321.04
5.6.110.0170.07721.10
5.6.100.0030.04020.98
5.6.90.0130.07721.12
5.6.80.0070.07720.27
5.5.350.0000.07020.34
5.5.340.0100.08017.96
5.5.330.0130.07720.37
5.5.320.0200.04020.13
5.5.310.0230.04320.21
5.5.300.0030.03717.91
5.5.290.0070.08718.01
5.5.280.0000.04320.76
5.5.270.0030.06320.83
5.5.260.0100.08020.80
5.5.250.0030.04720.69
5.5.240.0130.07720.15
5.4.450.0170.06719.42
5.4.440.0030.09019.44
5.4.430.0070.07719.47
5.4.420.0030.05719.24
5.4.410.0100.07319.11
5.4.400.0100.03319.12
5.4.390.0070.08019.14
5.4.380.0030.08019.16
5.4.370.0130.06719.15
5.4.360.0070.04019.20
5.4.350.0070.04019.18
5.4.340.0130.06719.16
5.4.320.0070.04718.81
5.4.310.0000.08719.19
5.4.300.0030.05319.14
5.4.290.0070.04018.91
5.4.280.0170.06719.00
5.4.270.0170.06718.91
5.4.260.0200.05719.09
5.4.250.0030.04019.11
5.4.240.0070.08018.78
5.4.230.0070.06019.15
5.4.220.0100.08019.01
5.4.210.0070.07319.17
5.4.200.0100.07318.77
5.4.190.0100.03719.17
5.4.180.0000.07018.80
5.4.170.0030.07018.81
5.4.160.0130.05319.05
5.4.150.0030.06019.06
5.4.140.0070.07716.35
5.4.130.0000.04716.24
5.4.120.0170.06716.26
5.4.110.0030.05316.33
5.4.100.0100.05716.30
5.4.90.0100.05316.30
5.4.80.0100.06716.27
5.4.70.0070.03316.25
5.4.60.0070.05316.12
5.4.50.0070.07316.55
5.4.40.0100.06316.12
5.4.30.0000.05316.31
5.4.20.0100.04016.24
5.4.10.0030.07016.33
5.4.00.0070.06015.71
5.3.290.0070.08014.55
5.3.280.0070.07314.54
5.3.270.0130.07014.57
5.3.260.0130.04014.64
5.3.250.0100.03714.63
5.3.240.0070.04714.61
5.3.230.0100.08014.52
5.3.220.0070.03714.50
5.3.210.0170.06714.38
5.3.200.0030.08014.46
5.3.190.0130.03714.49
5.3.180.0030.07714.39
5.3.170.0070.05714.66
5.3.160.0100.07714.57
5.3.150.0070.07714.48
5.3.140.0070.07314.48
5.3.130.0070.07714.48
5.3.120.0100.03714.46
5.3.110.0130.06714.42
5.3.100.0100.05013.82
5.3.90.0070.07313.96
5.3.80.0070.07314.11
5.3.70.0100.07013.94
5.3.60.0030.07313.93
5.3.50.0070.03713.96
5.3.40.0070.05013.90
5.3.30.0030.04313.88
5.3.20.0230.06013.66
5.3.10.0070.06713.59
5.3.00.0030.07313.58
5.2.170.0030.05011.02
5.2.160.0070.02710.96
5.2.150.0000.06011.02
5.2.140.0070.06011.13
5.2.130.0070.06010.99
5.2.120.0000.04011.25
5.2.110.0000.06711.09
5.2.100.0070.03011.05
5.2.90.0130.03010.97
5.2.80.0030.06711.08
5.2.70.0000.05311.09
5.2.60.0070.03010.97
5.2.50.0030.03010.95
5.2.40.0070.05310.81
5.2.30.0000.03310.95
5.2.20.0030.03010.94
5.2.10.0030.06010.91
5.2.00.0030.06310.73
5.1.60.0100.0479.93
5.1.50.0070.0509.96
5.1.40.0070.0409.92
5.1.30.0030.06010.32
5.1.20.0070.03010.39
5.1.10.0070.04710.04
5.1.00.0070.03710.04
5.0.50.0000.0508.53
5.0.40.0030.0478.42
5.0.30.0130.0538.18
5.0.20.0100.0308.34
5.0.10.0130.0338.30
5.0.00.0000.0578.21
4.4.90.0000.0278.00
4.4.80.0030.0338.00
4.4.70.0030.0138.00
4.4.60.0000.0178.00
4.4.50.0000.0238.00
4.4.40.0030.0338.00
4.4.30.0070.0338.00
4.4.20.0000.0408.00
4.4.10.0030.0378.00
4.4.00.0000.0508.00
4.3.110.0070.0278.00
4.3.100.0070.0308.00
4.3.90.0000.0378.00
4.3.80.0030.0438.00
4.3.70.0000.0378.00
4.3.60.0030.0308.00
4.3.50.0070.0278.00
4.3.40.0030.0538.00
4.3.30.0070.0308.00
4.3.20.0000.0378.00
4.3.10.0030.0278.00
4.3.00.0000.0278.00

preferences:
48.44 ms | 401 KiB | 5 Q