3v4l.org

run code in 300+ PHP versions simultaneously
<?php $result = "°Freenew°\x90ɮ\xa0"; //$result = trim($result,"\xc2"/*"\xa0"*/); echo preg_replace('#[\x00-\x1F\x7F-\x9F]#S', '', $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.00418.43
8.3.50.0090.00622.05
8.3.40.0140.00718.70
8.3.30.0070.00718.93
8.3.20.0050.00318.95
8.3.10.0050.00320.93
8.3.00.0050.00221.77
8.2.180.0070.00716.50
8.2.170.0040.01122.96
8.2.160.0070.00720.48
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0050.00226.16
8.2.120.0040.00420.89
8.2.110.0060.00320.33
8.2.100.0030.00817.88
8.2.90.0070.00019.23
8.2.80.0000.00917.97
8.2.70.0000.00817.63
8.2.60.0030.00617.80
8.2.50.0050.00318.07
8.2.40.0000.00818.16
8.2.30.0000.00821.17
8.2.20.0060.00317.80
8.2.10.0040.00417.82
8.2.00.0020.00517.70
8.1.280.0100.00725.92
8.1.270.0060.00623.99
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0090.00022.42
8.1.230.0100.00320.91
8.1.220.0050.00318.77
8.1.210.0060.00318.77
8.1.200.0080.00017.35
8.1.190.0040.00417.29
8.1.180.0040.00418.10
8.1.170.0000.00818.65
8.1.160.0000.00918.84
8.1.150.0000.00818.72
8.1.140.0000.00717.55
8.1.130.0000.00717.85
8.1.120.0040.00417.61
8.1.110.0000.00717.41
8.1.100.0050.00217.55
8.1.90.0040.00317.55
8.1.80.0070.00017.61
8.1.70.0040.00417.43
8.1.60.0060.00317.56
8.1.50.0000.00917.54
8.1.40.0080.00017.51
8.1.30.0000.00817.68
8.1.20.0050.00317.65
8.1.10.0000.00717.59
8.1.00.0000.00817.50
8.0.300.0000.00819.86
8.0.290.0040.00417.18
8.0.280.0000.00718.46
8.0.270.0000.00717.19
8.0.260.0000.00816.96
8.0.250.0070.00017.00
8.0.240.0030.00517.16
8.0.230.0000.00717.05
8.0.220.0040.00416.98
8.0.210.0030.00316.96
8.0.200.0000.00717.05
8.0.190.0030.00316.92
8.0.180.0000.00717.03
8.0.170.0000.00916.88
8.0.160.0070.00016.87
8.0.150.0000.00816.90
8.0.140.0000.00716.80
8.0.130.0060.00013.48
8.0.120.0040.00416.86
8.0.110.0000.00716.98
8.0.100.0040.00416.99
8.0.90.0000.00717.03
8.0.80.0120.00316.93
8.0.70.0040.00416.84
8.0.60.0040.00416.92
8.0.50.0040.00417.04
8.0.30.0150.00517.25
8.0.20.0120.00717.40
8.0.10.0000.00717.11
8.0.00.0060.01116.84
7.4.330.0020.00216.73
7.4.320.0000.00616.70
7.4.300.0030.00316.73
7.4.290.0030.00316.78
7.4.280.0040.00416.74
7.4.270.0070.00016.76
7.4.260.0050.00013.42
7.4.250.0000.00716.70
7.4.240.0050.00316.65
7.4.230.0070.00016.46
7.4.220.0040.01416.72
7.4.210.0060.01116.71
7.4.200.0070.00016.68
7.4.190.0070.00016.65
7.4.160.0120.01216.54
7.4.150.0170.00017.40
7.4.140.0070.01117.86
7.4.130.0100.01616.55
7.4.120.0100.00916.59
7.4.110.0070.01016.71
7.4.100.0100.00716.53
7.4.90.0180.00016.62
7.4.80.0110.00619.39
7.4.70.0110.01016.73
7.4.60.0080.00816.63
7.4.50.0080.00016.61
7.4.40.0070.01022.77
7.4.30.0000.01516.48
7.4.00.0030.01315.22
7.3.330.0050.00013.19
7.3.320.0020.00213.20
7.3.310.0000.00816.27
7.3.300.0070.00016.19
7.3.290.0130.00716.20
7.3.280.0100.00616.26
7.3.270.0170.00017.40
7.3.260.0160.00618.24
7.3.250.0130.00916.71
7.3.240.0070.01516.35
7.3.230.0140.00416.39
7.3.210.0100.01316.54
7.3.200.0170.00319.39
7.3.190.0180.00416.72
7.3.180.0150.00016.68
7.3.170.0130.00416.39
7.3.160.0090.01316.28
7.3.120.0090.00914.86
7.3.110.0110.00714.82
7.3.100.0030.00614.91
7.3.90.0000.01314.55
7.3.80.0040.01415.05
7.3.70.0060.00914.71
7.3.60.0060.00815.02
7.3.50.0030.01414.96
7.3.40.0030.01214.94
7.3.30.0100.00314.86
7.3.20.0000.00916.71
7.3.10.0080.00416.68
7.3.00.0090.00916.47
7.2.330.0090.00916.43
7.2.320.0130.00716.68
7.2.310.0090.01216.75
7.2.300.0060.01116.52
7.2.290.0130.00316.59
7.2.240.0060.01215.21
7.2.230.0060.00915.05
7.2.220.0030.01215.17
7.2.210.0000.01814.94
7.2.200.0090.00915.29
7.2.190.0030.01415.02
7.2.180.0070.00415.14
7.2.170.0060.01015.00
7.2.160.0040.00715.13
7.2.150.0030.01016.74
7.2.140.0000.01517.08
7.2.130.0060.00616.92
7.2.120.0070.00716.98
7.2.110.0120.00316.96
7.2.100.0120.00016.94
7.2.90.0070.00417.18
7.2.80.0090.00416.84
7.2.70.0060.00917.16
7.2.60.0070.00817.01
7.2.50.0100.00316.89
7.2.40.0060.00616.97
7.2.30.0030.01016.83
7.2.20.0100.00317.07
7.2.10.0130.00317.07
7.2.00.0040.01116.88
7.1.330.0070.01015.73
7.1.320.0070.00715.87
7.1.310.0040.01115.77
7.1.300.0060.00316.07
7.1.290.0090.00015.93
7.1.280.0060.00916.10
7.1.270.0070.00715.95
7.1.260.0150.00415.92
7.1.250.0090.00615.75
7.1.200.0030.00715.73
7.1.70.0000.00817.33
7.1.60.0150.00919.40
7.1.50.0060.01917.13
7.1.00.0130.05722.36
7.0.200.0030.00817.05
7.0.140.0100.06721.99
7.0.80.0330.05319.92
7.0.70.0100.03319.89
7.0.60.0470.07319.96
7.0.50.0100.03720.30
7.0.40.0100.07020.11
7.0.30.0000.04320.08
7.0.20.0070.06320.19
7.0.10.0000.04020.16
7.0.00.0100.08720.13
5.6.280.0070.06721.01
5.6.230.0100.08320.71
5.6.220.0100.09020.46
5.6.210.0130.07320.61
5.6.200.0100.07021.08
5.6.190.0030.04321.03
5.6.180.0070.06320.93
5.6.170.0130.03321.01
5.6.160.0100.07321.01
5.6.150.0130.07721.05
5.6.140.0130.07021.03
5.6.130.0230.06321.03
5.6.120.0200.03320.99
5.6.110.0130.07021.08
5.6.100.0100.06020.93
5.6.90.0130.08320.99
5.6.80.0130.06720.42
5.6.70.0100.06020.45
5.6.60.0130.07320.43
5.6.50.0070.04320.32
5.6.40.0070.08020.43
5.6.30.0030.05020.46
5.6.20.0000.07320.36
5.6.10.0030.07320.46
5.6.00.0030.04720.36
5.5.370.0100.07020.44
5.5.360.0130.07020.32
5.5.350.0030.04020.44
5.5.340.0000.10020.92
5.5.330.0030.04320.82
5.5.320.0030.06720.91
5.5.310.0100.07720.90
5.5.300.0130.07720.75
5.5.290.0030.07320.90
5.5.280.0070.05020.76
5.5.270.0130.06320.81
5.5.260.0030.08720.85
5.5.250.0030.07020.64
5.5.240.0100.07720.30
5.5.230.0230.07020.28
5.5.220.0130.04020.29
5.5.210.0070.08020.23
5.5.200.0170.07019.99
5.5.190.0100.07320.07
5.5.180.0070.04720.16
5.5.160.0130.07320.20
5.5.150.0200.04020.23
5.5.140.0070.03719.98
5.5.130.0130.07320.16
5.5.120.0170.06020.26
5.5.110.0000.07320.15
5.5.100.0030.08020.15
5.5.90.0170.06019.96
5.5.80.0100.06720.09
5.5.70.0070.06719.93
5.5.60.0100.03720.10
5.5.50.0170.03320.06
5.5.40.0070.04720.18
5.5.30.0070.05019.99
5.5.20.0170.06320.04
5.5.10.0130.06320.03
5.5.00.0130.07019.97
5.4.450.0070.06719.56
5.4.440.0070.07019.27
5.4.430.0100.05719.46
5.4.420.0170.07319.46
5.4.410.0130.04019.16
5.4.400.0100.07318.90
5.4.390.0170.06319.12
5.4.380.0100.07319.16
5.4.370.0100.06019.10
5.4.360.0030.08018.95
5.4.350.0000.05318.78
5.4.340.0000.05019.06
5.4.320.0130.06718.95
5.4.310.0030.07719.14
5.4.300.0130.06719.14
5.4.290.0000.06018.78
5.4.280.0130.04018.94
5.4.270.0000.09018.78
5.4.260.0070.07318.90
5.4.250.0100.04018.98
5.4.240.0030.06019.03
5.4.230.0030.05019.05
5.4.220.0070.07018.99
5.4.210.0170.06319.21
5.4.200.0030.04318.88
5.4.190.0070.03718.91
5.4.180.0030.07718.93
5.4.170.0030.08319.23
5.4.160.0030.08318.76
5.4.150.0030.08019.05
5.4.140.0170.03316.30
5.4.130.0070.04016.23
5.4.120.0000.04016.30
5.4.110.0070.04016.28
5.4.100.0030.03716.43
5.4.90.0000.04016.21
5.4.80.0130.02716.32
5.4.70.0030.03716.41
5.4.60.0070.03716.33
5.4.50.0000.04016.43
5.4.40.0000.04316.45
5.4.30.0070.03316.27
5.4.20.0030.04716.39
5.4.10.0100.03716.18
5.4.00.0030.07015.58
5.3.290.0000.08314.52
5.3.280.0000.04314.42
5.3.270.0070.06714.59
5.3.260.0100.07714.60
5.3.250.0070.07714.59
5.3.240.0030.04314.61
5.3.230.0070.04714.57
5.3.220.0070.03314.56
5.3.210.0030.04014.40
5.3.200.0030.03714.51
5.3.190.0030.03714.55
5.3.180.0100.03714.54
5.3.170.0070.03314.55
5.3.160.0000.04014.41
5.3.150.0000.07314.54
5.3.140.0030.03714.40
5.3.130.0000.04714.41
5.3.120.0030.03714.39
5.3.110.0000.04314.54
5.3.100.0070.04313.86
5.3.90.0000.05314.01
5.3.80.0030.07013.86
5.3.70.0030.04014.02
5.3.60.0100.07313.96
5.3.50.0030.05013.93
5.3.40.0030.03713.90
5.3.30.0100.03013.89
5.3.20.0070.03313.56
5.3.10.0000.03713.51
5.3.00.0000.03713.61
5.2.170.0030.06313.51
5.2.160.0030.02713.51
5.2.150.0000.03013.51
5.2.140.0030.03013.51
5.2.130.0000.03013.51
5.2.120.0030.02713.51
5.2.110.0000.03013.51
5.2.100.0070.02713.51
5.2.90.0030.02713.51
5.2.80.0070.02313.51
5.2.70.0030.04013.51
5.2.60.0030.02713.51
5.2.50.0030.03013.51
5.2.40.0000.03313.51
5.2.30.0070.03313.51
5.2.20.0070.02313.51
5.2.10.0000.03713.51
5.2.00.0030.03013.51
5.1.60.0030.02713.51
5.1.50.0000.03013.51
5.1.40.0070.01713.51
5.1.30.0000.03013.51
5.1.20.0030.02313.51
5.1.10.0030.02013.51
5.1.00.0030.02313.51
5.0.50.0000.02313.51
5.0.40.0000.01713.51
5.0.30.0000.03013.51
5.0.20.0000.02013.51
5.0.10.0000.02013.51
5.0.00.0000.03013.51
4.4.90.0000.02013.51
4.4.80.0000.01713.51
4.4.70.0000.01713.51
4.4.60.0000.01713.51
4.4.50.0070.01013.51
4.4.40.0000.02313.51
4.4.30.0000.01713.51
4.4.20.0000.01713.51
4.4.10.0000.01713.51
4.4.00.0030.02013.51
4.3.110.0000.01313.51
4.3.100.0030.01313.51
4.3.90.0000.01713.51
4.3.80.0000.02013.51
4.3.70.0070.01013.51
4.3.60.0030.01313.51
4.3.50.0000.01313.51
4.3.40.0030.02013.51
4.3.30.0000.01713.51
4.3.20.0030.01013.51
4.3.10.0000.01313.51
4.3.00.0000.01313.51

preferences:
43.07 ms | 401 KiB | 5 Q