3v4l.org

run code in 300+ PHP versions simultaneously
<?php $result = "°Freenew°ɮ\xc2\xe4dfg\xa0"; //$result = trim($result,"\xc2"/*"\xa0"*/); //echo preg_replace('#[\x00-\x1F\x7F-\x9F]#', '', $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.0140.00316.75
8.3.50.0130.00822.27
8.3.40.0070.01118.96
8.3.30.0040.01119.01
8.3.20.0040.00420.18
8.3.10.0000.00823.57
8.3.00.0080.00019.63
8.2.180.0040.01116.88
8.2.170.0140.00022.96
8.2.160.0100.00320.24
8.2.150.0000.00724.18
8.2.140.0000.00724.66
8.2.130.0050.00326.16
8.2.120.0060.00322.25
8.2.110.0040.00422.08
8.2.100.0090.00317.84
8.2.90.0000.00819.21
8.2.80.0000.00918.04
8.2.70.0030.00617.50
8.2.60.0090.00017.80
8.2.50.0060.00318.07
8.2.40.0030.00518.34
8.2.30.0000.00818.05
8.2.20.0000.00817.77
8.2.10.0050.00318.29
8.2.00.0050.00218.04
8.1.280.0080.00825.92
8.1.270.0110.00422.10
8.1.260.0050.00326.35
8.1.250.0070.00028.09
8.1.240.0050.00323.98
8.1.230.0040.00819.15
8.1.220.0000.00817.74
8.1.210.0060.00318.77
8.1.200.0040.00417.35
8.1.190.0050.00317.41
8.1.180.0090.00018.10
8.1.170.0060.00618.47
8.1.160.0080.00021.99
8.1.150.0050.00218.80
8.1.140.0000.00717.62
8.1.130.0000.00717.91
8.1.120.0050.00317.57
8.1.110.0060.00317.55
8.1.100.0040.00417.57
8.1.90.0050.00317.47
8.1.80.0070.00017.57
8.1.70.0000.00717.44
8.1.60.0040.00417.67
8.1.50.0050.00217.53
8.1.40.0040.00417.60
8.1.30.0030.00617.75
8.1.20.0000.00817.76
8.1.10.0050.00217.67
8.1.00.0000.00717.61
8.0.300.0040.00418.77
8.0.290.0000.00716.93
8.0.280.0040.00418.41
8.0.270.0080.00017.28
8.0.260.0030.00516.89
8.0.250.0030.00317.15
8.0.240.0040.00417.18
8.0.230.0000.00717.08
8.0.220.0030.00317.09
8.0.210.0000.00717.08
8.0.200.0040.00417.05
8.0.190.0030.00416.96
8.0.180.0000.00717.02
8.0.170.0050.00316.99
8.0.160.0000.00717.03
8.0.150.0040.00416.94
8.0.140.0050.00316.96
8.0.130.0030.00313.45
8.0.120.0080.00017.07
8.0.110.0000.00716.99
8.0.100.0040.00416.94
8.0.90.0000.00816.93
8.0.80.0030.01217.07
8.0.70.0040.00417.13
8.0.60.0000.00716.88
8.0.50.0030.00517.07
8.0.30.0120.00617.30
8.0.20.0150.00317.45
8.0.10.0000.00717.16
8.0.00.0090.00817.07
7.4.330.0060.00015.17
7.4.320.0060.00016.88
7.4.300.0060.00016.63
7.4.290.0060.00316.72
7.4.280.0000.00816.84
7.4.270.0030.00316.67
7.4.260.0030.00316.58
7.4.250.0080.00016.72
7.4.240.0040.00316.84
7.4.230.0030.00316.93
7.4.220.0090.01016.79
7.4.210.0090.00916.84
7.4.200.0040.00416.80
7.4.190.0030.00316.84
7.4.160.0040.01716.64
7.4.150.0060.01117.40
7.4.140.0090.01117.86
7.4.130.0080.00816.67
7.4.120.0060.01216.68
7.4.110.0110.00516.83
7.4.100.0110.00716.77
7.4.90.0060.01316.71
7.4.80.0110.01419.39
7.4.70.0090.01516.65
7.4.60.0070.01116.74
7.4.50.0000.00516.28
7.4.40.0030.01022.77
7.4.30.0120.00616.71
7.4.10.0060.01016.68
7.4.00.0120.00515.77
7.3.330.0040.00413.29
7.3.320.0000.00613.20
7.3.310.0000.00616.42
7.3.300.0040.00416.37
7.3.290.0030.01516.41
7.3.280.0100.00916.37
7.3.270.0140.00717.40
7.3.260.0140.00416.88
7.3.250.0070.01016.63
7.3.240.0090.01516.58
7.3.230.0080.00816.46
7.3.210.0180.00016.42
7.3.200.0130.00319.39
7.3.190.0130.00316.41
7.3.180.0130.00616.77
7.3.170.0090.00616.56
7.3.160.0130.00616.53
7.3.130.0140.00316.37
7.3.120.0060.01015.88
7.3.110.0070.01015.52
7.3.100.0050.01115.61
7.3.90.0060.00515.58
7.3.80.0090.00715.89
7.3.70.0050.00515.71
7.3.60.0090.00815.45
7.3.50.0030.01015.53
7.3.40.0060.00615.52
7.3.30.0020.01115.47
7.3.20.0080.00817.46
7.3.10.0050.01317.06
7.3.00.0070.00817.22
7.2.330.0060.01216.78
7.2.320.0080.00816.56
7.2.310.0070.01016.68
7.2.300.0100.00716.75
7.2.290.0130.01016.54
7.2.260.0130.00616.62
7.2.250.0080.01216.64
7.2.240.0090.00815.94
7.2.230.0070.00715.92
7.2.220.0060.00615.90
7.2.210.0100.00715.89
7.2.200.0040.00915.83
7.2.190.0030.01115.86
7.2.180.0030.00815.84
7.2.170.0020.00915.96
7.2.160.0040.01115.81
7.2.150.0080.01017.50
7.2.140.0100.00717.80
7.2.130.0080.00617.34
7.2.120.0080.00917.36
7.2.110.0080.01017.39
7.2.100.0120.00417.38
7.2.90.0110.00717.34
7.2.80.0060.01217.31
7.2.70.0110.00717.33
7.2.60.0040.01117.28
7.2.50.0070.00617.39
7.2.40.0100.01017.36
7.2.30.0110.00617.24
7.2.20.0110.00617.36
7.2.10.0080.01217.34
7.2.00.0060.00817.96
7.1.330.0050.01116.70
7.1.320.0030.01016.75
7.1.310.0110.00016.72
7.1.300.0080.01016.63
7.1.290.0060.00616.67
7.1.280.0060.00516.73
7.1.270.0100.00516.72
7.1.260.0080.00716.63
7.1.250.0080.01116.22
7.1.240.0060.01017.66
7.1.230.0120.00317.27
7.1.220.0060.00617.48
7.1.210.0060.00917.46
7.1.200.0060.00516.83
7.1.190.0070.00417.44
7.1.180.0080.00417.52
7.1.170.0070.01017.33
7.1.160.0040.01117.54
7.1.150.0070.00717.57
7.1.140.0030.01017.50
7.1.130.0040.01117.41
7.1.120.0080.00417.54
7.1.110.0000.01417.25
7.1.100.0030.00817.80
7.1.90.0000.01517.59
7.1.80.0060.00617.53
7.1.70.0040.00617.43
7.1.60.0050.01518.48
7.1.50.0050.01117.30
7.1.40.0080.00517.57
7.1.30.0060.00917.29
7.1.20.0030.01217.39
7.1.10.0080.00317.41
7.1.00.0070.04019.87
7.0.330.0060.00317.16
7.0.320.0000.00917.06
7.0.310.0100.00017.28
7.0.300.0040.00417.25
7.0.290.0070.01017.15
7.0.280.0120.00417.21
7.0.270.0070.00717.21
7.0.260.0000.01417.04
7.0.250.0070.00717.05
7.0.240.0000.01117.26
7.0.230.0080.00817.29
7.0.220.0040.00417.03
7.0.210.0060.00916.87
7.0.200.0050.00717.06
7.0.190.0070.00717.23
7.0.180.0040.01116.97
7.0.170.0030.01017.11
7.0.160.0030.00617.05
7.0.150.0070.00717.27
7.0.140.0050.04119.60
7.0.130.0120.00417.24
7.0.120.0070.01017.17
7.0.110.0030.01017.28
7.0.100.0070.02718.54
7.0.90.0020.04418.56
7.0.80.0050.04518.63
7.0.70.0080.04218.49
7.0.60.0070.03418.56
7.0.50.0030.04318.68
7.0.40.0120.04017.69
7.0.30.0080.04217.57
7.0.20.0100.04217.62
7.0.10.0070.04317.58
7.0.00.0050.04117.55
5.6.400.0060.00615.98
5.6.390.0060.00615.89
5.6.380.0000.01016.00
5.6.370.0070.01015.97
5.6.360.0030.01215.65
5.6.350.0000.01315.63
5.6.340.0090.00615.79
5.6.330.0090.00615.80
5.6.320.0040.00915.86
5.6.310.0060.00615.75
5.6.300.0060.00915.95
5.6.290.0000.01016.02
5.6.280.0050.04218.42
5.6.270.0040.01115.93
5.6.260.0060.00615.70
5.6.250.0110.04018.30
5.6.240.0110.03818.10
5.6.230.0020.05218.23
5.6.220.0070.04018.27
5.6.210.0110.04118.30
5.6.200.0100.04218.37
5.6.190.0030.05018.42
5.6.180.0080.04118.37
5.6.170.0070.04318.44
5.6.160.0060.03818.35
5.6.150.0080.04418.61
5.6.140.0070.02818.49
5.6.130.0070.04718.54
5.6.120.0080.04318.41
5.6.110.0070.04718.39
5.6.100.0150.03218.37
5.6.90.0080.02718.53
5.6.80.0120.03718.02
5.6.70.0060.04118.14
5.6.60.0050.04518.11
5.6.50.0070.04518.11
5.6.40.0070.03518.19
5.6.30.0050.02918.07
5.6.20.0060.02318.17
5.6.10.0070.02318.10
5.6.00.0020.04418.01
5.5.380.0080.04118.11
5.5.370.0020.04618.18
5.5.360.0080.04318.13
5.5.350.0130.03717.98
5.5.340.0020.04818.42
5.5.330.0110.04118.39
5.5.320.0100.04118.34
5.5.310.0120.03818.41
5.5.300.0080.04718.36
5.5.290.0020.04918.30
5.5.280.0050.04018.37
5.5.270.0050.03018.19
5.5.260.0070.04318.24
5.5.250.0070.04518.11
5.5.240.0070.04418.01
5.5.230.0100.03518.03
5.5.220.0070.04217.99
5.5.210.0050.04318.04
5.5.200.0050.03417.92
5.5.190.0050.03717.94
5.5.180.0100.02018.04
5.5.170.0070.00315.76
5.5.160.0070.02218.03
5.5.150.0030.02817.94
5.5.140.0040.02517.97
5.5.130.0050.02418.07
5.5.120.0050.02417.93
5.5.110.0070.02517.90
5.5.100.0030.02417.83
5.5.90.0060.01917.83
5.5.80.0070.04417.91
5.5.70.0070.04418.04
5.5.60.0070.04317.82
5.5.50.0090.01817.90
5.5.40.0050.02217.93
5.5.30.0070.03917.90
5.5.20.0050.02417.84
5.5.10.0050.04417.88
5.5.00.0070.02217.81
5.4.450.0090.04015.78
5.4.440.0060.04116.02
5.4.430.0070.04216.02
5.4.420.0070.04215.92
5.4.410.0070.04015.77
5.4.400.0070.03815.75
5.4.390.0050.04115.66
5.4.380.0100.03615.74
5.4.370.0120.03515.75
5.4.360.0110.03615.74
5.4.350.0030.03415.76
5.4.340.0100.02315.65
5.4.330.0030.01012.54
5.4.320.0020.02515.88
5.4.310.0020.04015.89
5.4.300.0050.02015.82
5.4.290.0030.02415.67
5.4.280.0070.02215.78
5.4.270.0050.02015.77
5.4.260.0040.02115.75
5.4.250.0020.02215.86
5.4.240.0070.02615.65
5.4.230.0030.04015.73
5.4.220.0050.03815.72
5.4.210.0070.03815.65
5.4.200.0080.01715.79
5.4.190.0030.02415.76
5.4.180.0050.02015.89
5.4.170.0000.02515.92
5.4.160.0030.03215.75
5.4.150.0030.02015.80
5.4.140.0020.02314.50
5.4.130.0030.04214.43
5.4.120.0070.01814.39
5.4.110.0060.01814.38
5.4.100.0060.01714.39
5.4.90.0020.02214.46
5.4.80.0020.02014.46
5.4.70.0050.02114.32
5.4.60.0070.01714.36
5.4.50.0070.02714.51
5.4.40.0060.02014.53
5.4.30.0030.01814.46
5.4.20.0080.01714.41
5.4.10.0050.02014.39
5.4.00.0070.03314.15
5.3.290.0080.01813.77
5.3.280.0000.04113.67
5.3.270.0020.04013.71
5.3.260.0030.04113.65
5.3.250.0070.01713.74
5.3.240.0020.02413.68
5.3.230.0060.01813.76
5.3.220.0050.02213.77
5.3.210.0070.02713.81
5.3.200.0080.01813.71
5.3.190.0090.03513.67
5.3.180.0020.03413.76
5.3.170.0030.02213.62
5.3.160.0050.02313.71
5.3.150.0080.01813.64
5.3.140.0030.02213.71
5.3.130.0030.03713.69
5.3.120.0030.02313.68
5.3.110.0050.01813.77
5.3.100.0050.01813.46
5.3.90.0020.02213.54
5.3.80.0030.02013.32
5.3.70.0040.03413.43
5.3.60.0030.01913.49
5.3.50.0030.01913.29
5.3.40.0020.02213.28
5.3.30.0020.04413.37
5.3.20.0040.02213.29
5.3.10.0000.02613.08
5.3.00.0020.02012.97
5.2.170.0030.04711.48
5.2.160.0000.05011.48
5.2.150.0070.03311.48
5.2.140.0070.02311.48
5.2.130.0030.05711.48
5.2.120.0100.02011.48
5.2.110.0070.02311.48
5.2.100.0030.02711.48
5.2.90.0070.05011.48
5.2.80.0070.06311.48
5.2.70.0000.06311.48
5.2.60.0030.06311.48
5.2.50.0070.06311.48
5.2.40.0000.06311.48
5.2.30.0000.04011.48
5.2.20.0100.05311.48
5.2.10.0030.06311.48
5.2.00.0070.06011.48
5.1.60.0030.05311.48
5.1.50.0030.05311.48
5.1.40.0030.04311.48
5.1.30.0030.04711.48
5.1.20.0070.05011.48
5.1.10.0130.04711.48
5.1.00.0030.05311.48
5.0.50.0000.02711.48
5.0.40.0070.03711.48
5.0.30.0030.05711.48
5.0.20.0030.03311.48
5.0.10.0030.04311.48
5.0.00.0070.06011.48
4.4.90.0000.03711.48
4.4.80.0030.03311.48
4.4.70.0000.04011.48
4.4.60.0000.04011.48
4.4.50.0030.03711.48
4.4.40.0000.05311.48
4.4.30.0100.02711.48
4.4.20.0030.03311.48
4.4.10.0030.03711.48
4.4.00.0100.04711.48
4.3.110.0000.02011.48
4.3.100.0000.04011.48
4.3.90.0030.03311.48
4.3.80.0030.04711.48
4.3.70.0030.03311.48
4.3.60.0030.03311.48
4.3.50.0000.03711.48
4.3.40.0000.05311.48
4.3.30.0000.03711.48
4.3.20.0000.02311.48
4.3.10.0030.03311.48
4.3.00.0000.04011.48

preferences:
48.38 ms | 401 KiB | 5 Q