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); echo preg_replace('~[\x{0080}-\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.0220.00018.22
8.3.50.0120.01121.99
8.3.40.0070.00718.84
8.3.30.0140.00018.97
8.3.20.0060.00318.85
8.3.10.0000.00821.10
8.3.00.0050.00321.78
8.2.180.0110.00316.75
8.2.170.0100.00322.96
8.2.160.0100.00320.35
8.2.150.0120.00325.66
8.2.140.0070.00024.66
8.2.130.0060.00326.16
8.2.120.0000.00721.01
8.2.110.0000.00920.57
8.2.100.0040.00817.97
8.2.90.0050.00319.23
8.2.80.0040.00417.97
8.2.70.0090.00317.63
8.2.60.0050.00318.03
8.2.50.0030.00618.07
8.2.40.0050.00318.22
8.2.30.0000.00721.18
8.2.20.0040.00417.71
8.2.10.0050.00317.76
8.2.00.0030.00717.64
8.1.280.0120.00325.92
8.1.270.0040.00423.99
8.1.260.0120.00326.35
8.1.250.0040.00428.09
8.1.240.0100.00320.68
8.1.230.0060.00620.84
8.1.220.0040.00418.77
8.1.210.0000.00818.77
8.1.200.0060.00617.23
8.1.190.0060.00317.29
8.1.180.0000.00918.10
8.1.170.0050.00518.52
8.1.160.0020.00518.85
8.1.150.0040.00418.73
8.1.140.0000.00817.62
8.1.130.0040.00417.92
8.1.120.0040.00417.61
8.1.110.0030.00617.59
8.1.100.0000.00817.39
8.1.90.0030.00317.55
8.1.80.0020.00517.55
8.1.70.0000.00717.50
8.1.60.0060.00317.71
8.1.50.0060.00317.61
8.1.40.0070.00017.60
8.1.30.0000.00817.72
8.1.20.0030.00617.74
8.1.10.0000.00817.68
8.1.00.0100.00317.65
8.0.300.0130.00019.95
8.0.290.0000.00917.18
8.0.280.0000.00818.55
8.0.270.0000.00817.31
8.0.260.0030.00616.97
8.0.250.0020.00517.11
8.0.240.0030.00617.14
8.0.230.0040.00416.95
8.0.220.0040.00416.95
8.0.210.0030.00316.93
8.0.200.0040.00417.04
8.0.190.0030.00517.05
8.0.180.0040.00416.95
8.0.170.0000.00916.91
8.0.160.0030.00316.95
8.0.150.0040.00416.91
8.0.140.0040.00417.00
8.0.130.0070.00013.45
8.0.120.0070.00016.96
8.0.110.0000.00716.94
8.0.100.0050.00216.98
8.0.90.0000.00817.04
8.0.80.0140.00616.93
8.0.70.0040.00416.88
8.0.60.0000.00817.02
8.0.50.0050.00216.84
8.0.30.0100.00916.94
8.0.20.0080.01017.42
8.0.10.0000.00716.97
8.0.00.0180.00616.84
7.4.330.0050.00014.93
7.4.320.0030.00316.66
7.4.300.0030.00316.66
7.4.290.0040.00416.66
7.4.280.0000.00716.63
7.4.270.0030.00316.77
7.4.260.0050.00013.40
7.4.250.0000.00816.76
7.4.240.0020.00516.70
7.4.230.0030.00316.57
7.4.220.0070.01416.68
7.4.210.0090.00516.73
7.4.200.0040.00416.50
7.4.190.0040.00416.77
7.4.160.0060.01316.79
7.4.150.0130.00717.40
7.4.140.0140.00417.86
7.4.130.0100.00716.61
7.4.120.0100.00716.65
7.4.110.0100.00716.69
7.4.100.0100.00716.58
7.4.90.0180.00316.58
7.4.80.0040.01619.39
7.4.70.0060.01216.58
7.4.60.0160.00716.55
7.4.50.0000.00616.55
7.4.40.0100.00722.52
7.4.30.0070.01016.45
7.4.00.0070.00714.90
7.3.330.0050.00013.04
7.3.320.0000.00513.11
7.3.310.0070.00016.15
7.3.300.0000.00716.30
7.3.290.0130.01016.34
7.3.280.0060.00916.28
7.3.270.0030.01317.40
7.3.260.0130.00818.24
7.3.250.0140.00616.32
7.3.240.0060.00916.35
7.3.230.0100.00716.45
7.3.210.0090.00916.59
7.3.200.0060.01219.39
7.3.190.0130.00616.52
7.3.180.0110.00316.31
7.3.170.0140.00716.67
7.3.160.0080.00816.61
7.3.120.0060.00915.16
7.2.330.0130.00616.63
7.2.320.0130.00716.73
7.2.310.0060.00916.46
7.2.300.0070.01016.79
7.2.290.0100.00616.76
7.2.60.0080.00816.80
7.2.00.0060.00619.35
7.1.200.0060.00915.64
7.1.100.0070.00718.07
7.1.70.0190.00617.29
7.1.60.0110.01519.40
7.1.50.0140.01016.70
7.1.00.0030.03322.33
7.0.200.0100.00317.05
7.0.140.0030.07321.96
7.0.60.0100.07319.93
7.0.50.0100.08017.89
7.0.40.0100.08017.80
7.0.30.0030.05017.63
7.0.20.0070.07717.68
7.0.10.0130.04317.67
7.0.00.0130.08017.71
5.6.280.0100.06720.88
5.6.210.0100.07720.69
5.6.200.0130.03318.16
5.6.190.0030.04318.11
5.6.180.0200.06718.22
5.6.170.0030.05318.21
5.6.160.0070.08318.12
5.6.150.0030.07318.11
5.6.140.0000.08018.21
5.6.130.0070.08018.11
5.6.120.0000.04718.11
5.6.110.0170.07718.14
5.6.100.0000.08718.15
5.6.90.0070.07718.07
5.6.80.0030.04717.57
5.6.70.0070.08017.50
5.6.60.0100.07317.52
5.6.50.0070.07717.55
5.6.40.0100.08017.51
5.6.30.0130.05017.45
5.6.20.0070.08017.44
5.6.10.0030.04717.43
5.6.00.0070.06717.42
5.5.350.0100.03320.41
5.5.340.0070.08018.02
5.5.330.0070.04317.97
5.5.320.0030.08717.97
5.5.310.0100.07717.89
5.5.300.0030.09017.98
5.5.290.0070.07317.91
5.5.280.0100.08318.00
5.5.270.0030.08017.88
5.5.260.0070.06017.89
5.5.250.0100.08017.83
5.5.240.0070.08017.40
5.5.230.0030.06317.25
5.5.220.0000.07317.35
5.5.210.0100.07317.34
5.5.200.0130.07017.27
5.5.190.0100.07317.37
5.5.180.0130.07317.27
5.5.160.0070.06717.31
5.5.150.0070.04317.33
5.5.140.0100.07717.33
5.5.130.0070.07317.26
5.5.120.0030.04317.33
5.5.110.0000.07717.25
5.5.100.0070.07317.16
5.5.90.0070.08317.23
5.5.80.0130.07317.26
5.5.70.0130.07317.20
5.5.60.0070.06317.20
5.5.50.0070.05017.16
5.5.40.0070.07717.26
5.5.30.0130.04317.17
5.5.20.0130.07017.19
5.5.10.0070.07017.13
5.5.00.0130.07717.20
5.4.450.0070.05319.30
5.4.440.0130.04019.32
5.4.430.0070.04319.52
5.4.420.0100.05719.21
5.4.410.0100.06019.22
5.4.400.0000.05018.89
5.4.390.0130.07019.01
5.4.380.0070.07318.96
5.4.370.0030.07719.12
5.4.360.0100.07319.07
5.4.350.0100.06319.03
5.4.340.0030.08019.09
5.4.320.0070.07018.98
5.4.310.0130.07018.89
5.4.300.0070.07318.99
5.4.290.0000.06718.96
5.4.280.0000.05719.00
5.4.270.0030.08319.00
5.4.260.0070.04719.09
5.4.250.0070.05718.90
5.4.240.0070.04018.98
5.4.230.0170.06718.82
5.4.220.0070.04319.11
5.4.210.0100.03718.98
5.4.200.0030.07018.98
5.4.190.0000.08019.11
5.4.180.0030.04018.98
5.4.170.0130.04719.19
5.4.160.0130.06319.19
5.4.150.0030.06019.05
5.4.140.0130.07016.25
5.4.130.0070.04316.28
5.4.120.0070.04016.33
5.4.110.0030.07316.17
5.4.100.0200.05716.23
5.4.90.0070.04316.36
5.4.80.0030.06316.22
5.4.70.0130.05016.51
5.4.60.0100.06716.36
5.4.50.0070.07016.38
5.4.40.0100.04016.39
5.4.30.0030.04016.32
5.4.20.0100.07716.22
5.4.10.0030.07716.33
5.4.00.0070.07715.59
5.3.290.0070.03714.48
5.3.280.0070.08014.55
5.3.270.0100.07314.43
5.3.260.0070.06314.38
5.3.250.0130.07014.55
5.3.240.0100.05314.57
5.3.230.0000.05714.60
5.3.220.0100.05714.38
5.3.210.0070.06714.51
5.3.200.0070.04714.38
5.3.190.0030.04014.54
5.3.180.0070.07714.48
5.3.170.0070.04314.54
5.3.160.0100.04314.53
5.3.150.0030.05014.51
5.3.140.0030.04014.54
5.3.130.0070.07714.45
5.3.120.0200.07014.51
5.3.110.0100.05314.32
5.3.100.0070.07013.81
5.3.90.0030.04713.98
5.3.80.0070.04013.96
5.3.70.0070.04013.75
5.3.60.0130.07013.96
5.3.50.0000.07313.91
5.3.40.0030.05313.88
5.3.30.0030.06713.87
5.3.20.0030.05713.66
5.3.10.0070.07313.59
5.3.00.0070.07013.58
5.2.170.0000.06711.04
5.2.160.0100.05710.93
5.2.150.0100.06011.07
5.2.140.0070.05711.11
5.2.130.0030.06011.09
5.2.120.0100.06010.88
5.2.110.0070.05310.93
5.2.100.0030.06011.07
5.2.90.0070.06011.06
5.2.80.0030.06311.06
5.2.70.0100.06010.91
5.2.60.0000.05710.83
5.2.50.0070.06311.04
5.2.40.0070.05711.14
5.2.30.0100.05710.93
5.2.20.0030.05010.87
5.2.10.0030.05710.88
5.2.00.0070.03310.75
5.1.60.0030.04710.05
5.1.50.0100.0539.97
5.1.40.0100.0339.91
5.1.30.0100.04010.27
5.1.20.0000.04010.19
5.1.10.0030.05010.04
5.1.00.0030.05710.05
5.0.50.0130.0378.65
5.0.40.0100.0308.65
5.0.30.0000.0638.65
5.0.20.0100.0408.65
5.0.10.0000.0438.65
5.0.00.0070.0638.65
4.4.90.0030.0338.65
4.4.80.0030.0338.65
4.4.70.0000.0208.65
4.4.60.0000.0378.65
4.4.50.0000.0338.65
4.4.40.0000.0438.65
4.4.30.0030.0378.65
4.4.20.0030.0238.65
4.4.10.0030.0338.65
4.4.00.0070.0538.65
4.3.110.0000.0378.65
4.3.100.0000.0278.65
4.3.90.0070.0338.65
4.3.80.0030.0508.65
4.3.70.0070.0308.65
4.3.60.0030.0308.65
4.3.50.0070.0308.65
4.3.40.0030.0308.65
4.3.30.0000.0378.65
4.3.20.0000.0278.65
4.3.10.0000.0238.65
4.3.00.0030.0208.65

preferences:
48.36 ms | 401 KiB | 5 Q