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.0120.00316.88
8.3.50.0130.00722.03
8.3.40.0000.01818.95
8.3.30.0110.00419.01
8.3.20.0040.00420.33
8.3.10.0070.00023.66
8.3.00.0040.00419.50
8.2.180.0130.00318.66
8.2.170.0080.00622.96
8.2.160.0110.00320.39
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0040.00422.26
8.2.110.0080.00022.20
8.2.100.0070.00417.84
8.2.90.0040.00419.34
8.2.80.0040.00417.97
8.2.70.0000.01117.75
8.2.60.0080.00017.89
8.2.50.0030.00518.07
8.2.40.0000.00820.07
8.2.30.0040.00418.17
8.2.20.0000.00817.96
8.2.10.0080.00018.23
8.2.00.0040.00717.97
8.1.280.0120.00925.92
8.1.270.0040.00424.02
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00623.95
8.1.230.0070.00419.09
8.1.220.0060.00317.74
8.1.210.0050.00318.77
8.1.200.0000.01017.48
8.1.190.0000.00817.38
8.1.180.0090.00018.10
8.1.170.0000.00918.62
8.1.160.0030.00622.00
8.1.150.0000.00818.81
8.1.140.0050.00317.62
8.1.130.0040.00417.93
8.1.120.0000.00717.58
8.1.110.0040.00517.54
8.1.100.0050.00317.45
8.1.90.0020.00517.61
8.1.80.0000.00817.55
8.1.70.0000.00717.51
8.1.60.0000.00917.57
8.1.50.0000.00817.61
8.1.40.0030.00517.54
8.1.30.0000.00817.67
8.1.20.0030.00517.80
8.1.10.0040.00417.64
8.1.00.0000.00717.69
8.0.300.0000.00719.11
8.0.290.0090.00017.18
8.0.280.0040.00418.61
8.0.270.0020.00517.25
8.0.260.0000.00817.30
8.0.250.0030.00317.12
8.0.240.0070.00017.08
8.0.230.0070.00016.96
8.0.220.0070.00017.10
8.0.210.0080.00017.10
8.0.200.0030.00317.08
8.0.190.0040.00416.95
8.0.180.0040.00417.03
8.0.170.0000.00717.00
8.0.160.0040.00416.97
8.0.150.0000.00816.96
8.0.140.0040.00416.86
8.0.130.0000.00813.51
8.0.120.0040.00416.89
8.0.110.0060.00317.09
8.0.100.0050.00216.99
8.0.90.0000.00816.88
8.0.80.0140.00717.05
8.0.70.0000.00816.89
8.0.60.0040.00417.05
8.0.50.0030.00516.89
8.0.30.0090.01217.17
8.0.20.0110.01017.40
8.0.10.0050.00317.13
8.0.00.0080.01016.93
7.4.330.0020.00215.00
7.4.320.0000.00716.69
7.4.300.0000.00616.80
7.4.290.0040.00416.68
7.4.280.0040.00416.68
7.4.270.0050.00216.79
7.4.260.0000.00716.84
7.4.250.0000.00816.77
7.4.240.0040.00316.74
7.4.230.0000.00716.93
7.4.220.0210.00616.86
7.4.210.0070.00716.78
7.4.200.0040.00416.58
7.4.190.0000.00716.78
7.4.160.0110.00516.96
7.4.150.0140.00317.40
7.4.140.0050.01517.86
7.4.130.0080.00816.73
7.4.120.0070.00916.62
7.4.110.0040.01516.71
7.4.100.0060.01216.75
7.4.90.0070.01016.72
7.4.80.0160.00619.39
7.4.70.0070.01016.69
7.4.60.0070.01116.64
7.4.50.0050.00316.61
7.4.40.0070.01016.59
7.4.30.0000.01616.58
7.4.00.0060.00615.10
7.3.330.0050.00313.09
7.3.320.0000.00513.19
7.3.310.0000.00816.50
7.3.300.0030.00316.41
7.3.290.0060.01216.45
7.3.280.0070.00816.40
7.3.270.0100.00717.40
7.3.260.0150.00916.59
7.3.250.0090.00816.57
7.3.240.0140.00316.31
7.3.230.0070.01116.59
7.3.210.0090.00916.52
7.3.200.0120.00919.39
7.3.190.0040.01916.38
7.3.180.0130.00316.27
7.3.170.0130.00316.48
7.3.160.0100.00716.61
7.3.120.0100.00715.25
7.2.330.0140.00316.65
7.2.320.0090.00916.74
7.2.310.0060.01016.62
7.2.300.0140.00316.59
7.2.290.0060.01316.74
7.2.00.0040.00819.61
7.1.200.0120.00016.02
7.1.100.0040.00818.16
7.1.70.0030.00317.25
7.1.60.0030.02019.46
7.1.50.0040.01117.04
7.1.00.0000.08022.34
7.0.200.0000.00916.95
7.0.140.0030.07321.99
7.0.60.0030.08321.75
7.0.50.0030.05322.09
7.0.40.0000.05720.07
7.0.30.0030.08720.15
7.0.20.0030.07720.10
7.0.10.0030.07020.07
7.0.00.0100.08020.14
5.6.280.0000.07721.04
5.6.210.0130.07320.76
5.6.200.0030.07020.97
5.6.190.0130.06721.13
5.6.180.0170.07021.05
5.6.170.0000.09021.00
5.6.160.0000.07320.96
5.6.150.0070.08021.09
5.6.140.0000.09020.99
5.6.130.0030.09320.89
5.6.120.0000.09020.97
5.6.110.0030.07021.12
5.6.100.0000.08020.98
5.6.90.0070.08320.87
5.6.80.0070.07320.50
5.6.70.0030.07720.52
5.6.60.0000.08720.39
5.6.50.0070.07320.39
5.6.40.0000.08020.39
5.6.30.0100.07020.34
5.6.20.0100.07320.46
5.6.10.0070.08020.37
5.6.00.0070.07320.44
5.5.350.0000.08020.43
5.5.340.0030.07320.80
5.5.330.0000.08320.68
5.5.320.0000.09020.65
5.5.310.0000.07320.95
5.5.300.0030.04020.79
5.5.290.0030.07320.84
5.5.280.0030.07020.72
5.5.270.0070.08020.93
5.5.260.0000.06720.88
5.5.250.0100.07720.61
5.5.240.0030.08320.28
5.5.230.0000.08720.14
5.5.220.0070.07720.21
5.5.210.0100.06320.21
5.5.200.0070.06720.25
5.5.190.0100.07719.99
5.5.180.0030.08020.23
5.5.160.0000.08020.14
5.5.150.0130.07020.21
5.5.140.0070.07320.32
5.5.130.0100.06020.02
5.5.120.0030.07020.11
5.5.110.0070.07320.22
5.5.100.0000.08020.01
5.5.90.0000.08020.12
5.5.80.0070.07320.00
5.5.70.0100.08020.06
5.5.60.0030.08020.02
5.5.50.0130.07019.98
5.5.40.0030.08320.05
5.5.30.0000.08719.96
5.5.20.0070.07319.97
5.5.10.0000.08719.98
5.5.00.0000.08020.16
5.4.450.0030.08019.23
5.4.440.0030.06319.42
5.4.430.0070.07719.17
5.4.420.0000.08319.49
5.4.410.0030.07719.36
5.4.400.0030.07318.85
5.4.390.0070.07718.85
5.4.380.0070.06719.01
5.4.370.0030.06718.98
5.4.360.0100.07319.00
5.4.350.0070.07019.01
5.4.340.0030.08018.93
5.4.320.0100.07318.93
5.4.310.0000.07719.10
5.4.300.0030.07319.00
5.4.290.0030.07019.01
5.4.280.0070.07718.93
5.4.270.0030.06718.99
5.4.260.0130.07019.07
5.4.250.0000.08318.87
5.4.240.0100.07019.06
5.4.230.0030.08319.19
5.4.220.0130.06719.07
5.4.210.0000.07318.98
5.4.200.0070.06319.08
5.4.190.0070.06719.09
5.4.180.0000.08319.02
5.4.170.0070.07019.19
5.4.160.0070.07319.14
5.4.150.0030.08018.95
5.4.140.0030.07716.29
5.4.130.0070.07316.19
5.4.120.0070.07316.35
5.4.110.0030.08016.25
5.4.100.0000.08716.36
5.4.90.0000.06016.36
5.4.80.0000.06716.17
5.4.70.0030.07316.23
5.4.60.0000.07316.25
5.4.50.0100.06316.19
5.4.40.0070.07016.23
5.4.30.0100.06316.23
5.4.20.0030.05316.32
5.4.10.0030.07016.21
5.4.00.0130.06015.77
5.3.290.0030.07714.63
5.3.280.0070.07014.55
5.3.270.0030.07714.58
5.3.260.0030.07714.52
5.3.250.0070.07014.55
5.3.240.0030.07314.57
5.3.230.0000.07314.55
5.3.220.0000.05714.50
5.3.210.0000.07014.46
5.3.200.0030.07014.39
5.3.190.0000.08014.47
5.3.180.0000.07014.46
5.3.170.0000.05314.40
5.3.160.0030.07314.51
5.3.150.0030.06714.50
5.3.140.0070.06714.52
5.3.130.0000.07314.46
5.3.120.0070.07714.49
5.3.110.0070.05014.48
5.3.100.0000.06313.96
5.3.90.0030.07314.00
5.3.80.0030.07713.98
5.3.70.0000.07313.98
5.3.60.0000.07013.93
5.3.50.0000.06713.91
5.3.40.0070.07313.71
5.3.30.0030.07313.83
5.3.20.0070.07013.61
5.3.10.0030.05313.55
5.3.00.0070.07013.57
5.2.170.0000.06311.09
5.2.160.0000.06311.06
5.2.150.0000.05011.15
5.2.140.0000.06311.05
5.2.130.0030.04010.93
5.2.120.0070.05311.12
5.2.110.0030.05711.08
5.2.100.0070.05011.10
5.2.90.0030.05310.93
5.2.80.0030.06011.13
5.2.70.0030.08010.88
5.2.60.0000.03011.06
5.2.50.0030.02710.80
5.2.40.0030.02710.98
5.2.30.0000.03010.95
5.2.20.0030.02710.93
5.2.10.0000.03010.85
5.2.00.0000.02710.55
5.1.60.0000.0239.99
5.1.50.0000.02310.02
5.1.40.0000.02310.00
5.1.30.0000.02710.18
5.1.20.0000.02710.39
5.1.10.0030.02310.05
5.1.00.0030.0239.90
5.0.50.0000.0209.25
5.0.40.0030.0139.25
5.0.30.0000.0309.25
5.0.20.0000.0179.25
5.0.10.0030.0139.25
5.0.00.0000.0239.25
4.4.90.0030.0139.25
4.4.80.0000.0179.25
4.4.70.0000.0179.25
4.4.60.0000.0179.25
4.4.50.0000.0179.25
4.4.40.0000.0279.25
4.4.30.0000.0139.25
4.4.20.0000.0139.25
4.4.10.0000.0179.25
4.4.00.0030.0209.25
4.3.110.0030.0109.25
4.3.100.0000.0179.25
4.3.90.0000.0139.25
4.3.80.0030.0179.25
4.3.70.0000.0109.25
4.3.60.0000.0139.25
4.3.50.0000.0179.25
4.3.40.0000.0209.25
4.3.30.0000.0179.25
4.3.20.0030.0109.25
4.3.10.0000.0139.25
4.3.00.0030.0109.25

preferences:
39.73 ms | 401 KiB | 5 Q