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); echo preg_replace('~[\x{0000}-\x{001F}\x{007F}-\x{00a0}\xc3\x82]~', '', $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.75
8.3.50.0120.00822.00
8.3.40.0120.00318.80
8.3.30.0150.00019.10
8.3.20.0050.00320.20
8.3.10.0060.00323.47
8.3.00.0070.00020.66
8.2.180.0140.00716.73
8.2.170.0120.00622.96
8.2.160.0000.01522.10
8.2.150.0050.00324.18
8.2.140.0090.00024.66
8.2.130.0050.00326.16
8.2.120.0080.00022.13
8.2.110.0060.00322.08
8.2.100.0000.01017.91
8.2.90.0060.00319.22
8.2.80.0090.00017.97
8.2.70.0100.00017.63
8.2.60.0060.00618.04
8.2.50.0030.00518.07
8.2.40.0060.00318.22
8.2.30.0040.00418.10
8.2.20.0000.00717.82
8.2.10.0060.00317.73
8.2.00.0000.00917.65
8.1.280.0000.01425.92
8.1.270.0040.00423.82
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0060.00323.81
8.1.230.0040.00819.05
8.1.220.0060.00317.74
8.1.210.0040.00418.77
8.1.200.0060.00317.47
8.1.190.0000.00817.28
8.1.180.0000.00818.10
8.1.170.0050.00318.71
8.1.160.0000.00821.89
8.1.150.0000.00718.65
8.1.140.0040.00417.66
8.1.130.0030.00317.86
8.1.120.0000.00817.60
8.1.110.0000.00717.56
8.1.100.0040.00417.57
8.1.90.0000.00717.56
8.1.80.0030.00317.45
8.1.70.0000.00717.49
8.1.60.0040.00417.68
8.1.50.0040.00417.63
8.1.40.0000.00817.63
8.1.30.0040.00417.82
8.1.20.0080.00017.76
8.1.10.0060.00317.56
8.1.00.0000.00717.62
8.0.300.0000.00718.77
8.0.290.0000.00717.05
8.0.280.0050.00318.46
8.0.270.0000.00717.29
8.0.260.0030.00316.84
8.0.250.0040.00417.16
8.0.240.0030.00317.07
8.0.230.0070.00017.00
8.0.220.0070.00016.94
8.0.210.0070.00016.96
8.0.200.0060.00017.07
8.0.190.0030.00616.95
8.0.180.0000.00716.97
8.0.170.0080.00017.07
8.0.160.0000.00717.01
8.0.150.0080.00017.05
8.0.140.0050.00316.88
8.0.130.0050.00013.43
8.0.120.0080.00016.89
8.0.110.0040.00417.05
8.0.100.0040.00416.98
8.0.90.0080.00016.97
8.0.80.0040.01116.97
8.0.70.0070.00016.93
8.0.60.0030.00516.95
8.0.50.0000.00716.80
8.0.30.0090.01317.03
8.0.20.0140.00517.40
8.0.10.0000.00817.17
8.0.00.0050.01317.03
7.4.330.0050.00015.05
7.4.320.0070.00016.68
7.4.300.0060.00016.78
7.4.290.0030.00316.75
7.4.280.0080.00016.70
7.4.270.0000.00716.75
7.4.260.0030.00316.75
7.4.250.0000.00716.66
7.4.240.0020.00516.73
7.4.230.0000.00716.50
7.4.220.0060.01216.84
7.4.210.0070.00916.73
7.4.200.0030.00316.76
7.4.190.0030.00316.47
7.4.160.0160.00016.49
7.4.150.0090.00917.40
7.4.140.0050.01217.86
7.4.130.0100.01016.58
7.4.120.0110.00916.69
7.4.110.0130.00316.57
7.4.100.0030.01416.69
7.4.90.0090.00916.87
7.4.80.0110.01116.70
7.4.70.0050.01316.55
7.4.60.0030.01316.36
7.4.50.0060.00316.47
7.4.40.0000.01522.77
7.4.30.0120.00616.59
7.4.00.0040.00815.26
7.3.330.0050.00013.26
7.3.320.0020.00213.20
7.3.310.0000.00716.35
7.3.300.0030.00316.24
7.3.290.0070.00716.35
7.3.280.0090.00716.30
7.3.270.0120.00617.40
7.3.260.0160.00716.66
7.3.250.0130.00516.51
7.3.240.0040.01316.27
7.3.230.0060.00916.39
7.3.210.0030.01316.37
7.3.200.0090.01319.39
7.3.190.0080.00816.25
7.3.180.0140.00416.44
7.3.170.0150.00816.31
7.3.160.0060.01016.39
7.3.120.0110.00717.15
7.3.110.0040.01117.15
7.3.100.0000.00817.15
7.3.90.0000.01617.15
7.3.80.0070.00317.15
7.3.70.0000.01617.15
7.3.60.0000.01017.15
7.3.50.0090.00317.15
7.3.40.0000.01017.15
7.3.30.0040.00717.15
7.3.20.0100.00017.15
7.3.10.0080.00817.15
7.3.00.0070.00717.15
7.2.330.0110.01116.62
7.2.320.0090.00916.68
7.2.310.0100.01016.75
7.2.300.0070.01016.55
7.2.290.0060.00916.52
7.2.240.0050.00517.15
7.2.230.0070.00717.15
7.2.220.0140.00017.15
7.2.210.0040.01117.15
7.2.200.0070.00317.15
7.2.190.0120.00317.15
7.2.180.0070.00717.15
7.2.170.0030.01017.15
7.2.160.0030.01017.15
7.2.150.0030.01017.15
7.2.140.0060.00917.15
7.2.130.0070.00717.15
7.2.120.0030.01117.15
7.2.110.0030.01317.15
7.2.100.0070.00417.15
7.2.90.0030.01217.15
7.2.80.0090.00617.15
7.2.70.0060.00917.15
7.2.60.0070.01017.15
7.2.50.0070.00717.15
7.2.40.0030.01117.15
7.2.30.0000.01417.15
7.2.20.0070.00417.15
7.2.10.0040.00817.15
7.2.00.0040.00818.29
7.1.330.0070.01017.15
7.1.320.0080.00317.15
7.1.310.0040.01117.15
7.1.300.0070.00717.15
7.1.290.0060.00617.15
7.1.280.0000.01017.15
7.1.270.0060.00717.15
7.1.260.0000.01317.15
7.1.250.0090.00617.15
7.1.100.0070.00718.26
7.1.70.0050.00517.09
7.1.60.0180.00719.27
7.1.50.0070.01417.13
7.1.00.0030.07722.41
7.0.200.0080.00416.95
7.0.140.0100.06721.96
7.0.100.0130.05319.96
7.0.90.0070.08019.92
7.0.80.0070.07719.91
7.0.70.0030.08720.01
7.0.60.0100.08320.00
7.0.50.0130.07320.32
7.0.40.0030.08720.09
7.0.30.0100.07719.99
7.0.20.0100.07720.14
7.0.10.0000.08720.12
7.0.00.0030.06320.04
5.6.280.0030.07320.81
5.6.250.0130.08020.59
5.6.240.0130.07720.50
5.6.230.0030.05320.62
5.6.220.0070.07720.58
5.6.210.0030.08720.61
5.6.200.0070.08721.08
5.6.190.0000.09021.02
5.6.180.0100.05021.10
5.6.170.0070.08021.10
5.6.160.0030.08721.03
5.6.150.0070.06721.07
5.6.140.0170.05021.17
5.6.130.0100.08021.16
5.6.120.0100.07321.02
5.6.110.0100.07321.04
5.6.100.0030.06721.00
5.6.90.0100.05321.00
5.6.80.0100.04320.44
5.6.70.0100.06720.32
5.6.60.0030.08020.39
5.6.50.0100.07720.48
5.6.40.0070.04320.35
5.6.30.0070.08020.38
5.6.20.0100.08020.42
5.6.10.0030.06720.48
5.6.00.0030.04720.36
5.5.380.0130.07720.47
5.5.370.0130.08020.36
5.5.360.0070.07020.33
5.5.350.0100.07320.37
5.5.340.0030.06320.92
5.5.330.0070.07320.73
5.5.320.0000.05320.83
5.5.310.0070.07020.90
5.5.300.0230.05320.87
5.5.290.0100.08320.79
5.5.280.0070.06020.75
5.5.270.0030.05020.73
5.5.260.0200.07320.89
5.5.250.0200.06320.61
5.5.240.0130.07020.15
5.5.230.0030.06020.23
5.5.220.0070.07320.01
5.5.210.0170.05320.24
5.5.200.0130.07019.99
5.5.190.0130.06320.27
5.5.180.0100.07720.14
5.5.160.0070.08020.27
5.5.150.0070.07020.14
5.5.140.0130.04720.07
5.5.130.0130.07020.14
5.5.120.0070.05720.13
5.5.110.0070.08020.23
5.5.100.0130.06020.06
5.5.90.0070.05019.93
5.5.80.0170.06319.94
5.5.70.0070.07019.96
5.5.60.0070.04019.99
5.5.50.0130.04020.14
5.5.40.0070.08020.14
5.5.30.0000.06019.89
5.5.20.0100.07320.08
5.5.10.0100.07319.98
5.5.00.0070.05719.95
5.4.450.0100.08319.35
5.4.440.0170.07319.13
5.4.430.0070.05319.43
5.4.420.0130.06719.55
5.4.410.0100.06719.26
5.4.400.0100.05719.05
5.4.390.0100.07319.07
5.4.380.0130.07019.02
5.4.370.0100.06319.11
5.4.360.0070.07719.20
5.4.350.0070.04019.03
5.4.340.0130.06719.03
5.4.320.0030.04719.05
5.4.310.0070.05019.07
5.4.300.0000.08719.02
5.4.290.0130.07019.23
5.4.280.0100.07718.91
5.4.270.0070.07318.81
5.4.260.0070.04319.07
5.4.250.0070.06719.02
5.4.240.0070.07719.05
5.4.230.0030.04719.04
5.4.220.0070.07318.96
5.4.210.0170.06718.97
5.4.200.0070.06719.02
5.4.190.0170.06319.09
5.4.180.0030.08318.96
5.4.170.0100.04019.09
5.4.160.0070.07019.00
5.4.150.0030.06019.00
5.4.140.0030.07016.19
5.4.130.0100.07316.37
5.4.120.0100.06716.33
5.4.110.0070.07716.35
5.4.100.0070.07716.20
5.4.90.0100.07016.36
5.4.80.0100.05316.36
5.4.70.0100.06016.20
5.4.60.0200.06016.18
5.4.50.0030.07716.30
5.4.40.0200.06016.47
5.4.30.0130.03316.41
5.4.20.0070.03716.35
5.4.10.0100.07316.19
5.4.00.0030.06715.56
5.3.290.0030.08014.64
5.3.280.0100.07014.54
5.3.270.0000.07014.44
5.3.260.0070.05314.44
5.3.250.0070.05014.46
5.3.240.0000.05714.59
5.3.230.0130.05014.50
5.3.220.0030.05314.55
5.3.210.0000.05314.52
5.3.200.0100.06014.39
5.3.190.0100.07314.55
5.3.180.0070.06714.52
5.3.170.0130.07314.54
5.3.160.0100.06714.55
5.3.150.0170.06314.54
5.3.140.0200.05714.38
5.3.130.0030.04714.41
5.3.120.0100.04014.49
5.3.110.0100.07014.50
5.3.100.0000.04713.89
5.3.90.0130.06714.01
5.3.80.0070.04013.92
5.3.70.0130.06013.95
5.3.60.0100.04713.85
5.3.50.0100.07013.94
5.3.40.0130.03313.79
5.3.30.0070.04013.86
5.3.20.0030.07313.54
5.3.10.0070.06713.51
5.3.00.0130.06313.64
5.2.170.0000.04311.13
5.2.160.0000.05711.10
5.2.150.0070.03311.17
5.2.140.0070.06311.16
5.2.130.0100.05711.15
5.2.120.0070.05711.13
5.2.110.0170.04310.91
5.2.100.0030.06711.13
5.2.90.0070.05311.09
5.2.80.0270.04311.08
5.2.70.0000.04310.93
5.2.60.0030.06711.09
5.2.50.0030.06711.00
5.2.40.0100.05710.99
5.2.30.0070.06011.01
5.2.20.0070.05710.96
5.2.10.0030.06710.87
5.2.00.0070.05710.72
5.1.60.0000.0609.97
5.1.50.0030.05710.04
5.1.40.0070.0539.99
5.1.30.0070.05710.38
5.1.20.0000.06310.42
5.1.10.0070.05010.11
5.1.00.0030.0609.94
5.0.50.0100.0178.53
5.0.40.0030.0408.45
5.0.30.0000.0608.25
5.0.20.0000.0478.25
5.0.10.0030.0478.25
5.0.00.0030.0578.25
4.4.90.0030.0338.25
4.4.80.0070.0308.25
4.4.70.0030.0338.25
4.4.60.0030.0338.25
4.4.50.0070.0338.25
4.4.40.0000.0538.25
4.4.30.0000.0378.25
4.4.20.0070.0338.25
4.4.10.0070.0308.25
4.4.00.0030.0508.25
4.3.110.0030.0278.25
4.3.100.0000.0338.25
4.3.90.0030.0208.25
4.3.80.0070.0508.25
4.3.70.0030.0338.25
4.3.60.0000.0338.25
4.3.50.0070.0338.25
4.3.40.0000.0438.25
4.3.30.0030.0338.25
4.3.20.0000.0338.25
4.3.10.0030.0338.25
4.3.00.0000.0338.25

preferences:
42.86 ms | 401 KiB | 5 Q