3v4l.org

run code in 300+ PHP versions simultaneously
<?php $result = "°Freen\x18 ew°\x90ɮ\xc2"; $result = preg_replace('~[\x{0000}-\x{001F}\x{007F}-\x{00a0}[\xC2-\xDF]((?![\x80-\xBF])|[\x80-\xBF]{2,})])~', '', $result); /* //reject overly long 2 byte sequences, as well as characters above U+10000 and replace with ? $result= preg_replace( '/[\xC2-\xDF]((?![\x80-\xBF])|[\x80-\xBF]{2,})/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.0130.00618.55
8.3.50.0120.00821.92
8.3.40.0090.00618.82
8.3.30.0070.00718.79
8.3.20.0030.00320.38
8.3.10.0000.00822.03
8.3.00.0080.00022.58
8.2.180.0080.00816.50
8.2.170.0090.00622.96
8.2.160.0060.00920.70
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0000.00926.16
8.2.120.0040.00419.38
8.2.110.0060.00322.26
8.2.100.0040.00817.91
8.2.90.0000.00819.29
8.2.80.0030.00617.97
8.2.70.0060.00317.63
8.2.60.0060.00317.80
8.2.50.0040.00418.07
8.2.40.0030.00518.09
8.2.30.0000.00718.08
8.2.20.0000.00717.65
8.2.10.0000.00817.79
8.2.00.0040.00417.80
8.1.280.0160.00325.92
8.1.270.0040.00424.02
8.1.260.0080.00026.35
8.1.250.0130.00628.09
8.1.240.0100.00023.87
8.1.230.0040.00719.17
8.1.220.0000.00817.79
8.1.210.0000.00818.77
8.1.200.0090.00017.23
8.1.190.0060.00317.40
8.1.180.0000.00818.10
8.1.170.0060.00318.52
8.1.160.0040.00421.88
8.1.150.0000.00818.58
8.1.140.0040.00417.45
8.1.130.0030.00317.79
8.1.120.0070.00017.31
8.1.110.0070.00017.43
8.1.100.0000.00717.42
8.1.90.0040.00417.41
8.1.80.0000.00817.40
8.1.70.0030.00317.38
8.1.60.0000.00817.48
8.1.50.0080.00017.41
8.1.40.0000.00817.45
8.1.30.0040.00417.56
8.1.20.0080.00017.62
8.1.10.0040.00417.48
8.1.00.0000.00717.38
8.0.300.0040.00418.77
8.0.290.0030.00317.04
8.0.280.0030.00618.36
8.0.270.0000.00717.29
8.0.260.0000.00716.93
8.0.250.0000.00617.05
8.0.240.0060.00316.90
8.0.230.0030.00317.00
8.0.220.0000.00716.87
8.0.210.0030.00316.91
8.0.200.0030.00316.93
8.0.190.0030.00616.84
8.0.180.0070.00016.83
8.0.170.0080.00016.91
8.0.160.0050.00216.86
8.0.150.0030.00316.82
8.0.140.0070.00016.88
8.0.130.0030.00313.37
8.0.120.0040.00416.93
8.0.110.0070.00016.90
8.0.100.0080.00016.78
8.0.90.0020.00516.89
8.0.80.0060.00916.91
8.0.70.0040.00416.91
8.0.60.0040.00416.91
8.0.50.0000.00716.75
8.0.30.0110.00817.14
8.0.20.0140.00517.40
8.0.10.0040.00417.06
8.0.00.0140.00816.54
7.4.330.0050.00015.03
7.4.320.0030.00316.46
7.4.300.0000.00616.46
7.4.290.0030.00316.65
7.4.280.0000.00816.57
7.4.270.0080.00016.52
7.4.260.0040.00416.58
7.4.250.0060.00316.59
7.4.240.0050.00216.58
7.4.230.0030.00316.63
7.4.220.0090.01016.70
7.4.210.0040.01016.46
7.4.200.0000.00716.58
7.4.190.0000.00816.70
7.4.160.0100.00616.54
7.4.150.0090.00917.40
7.4.140.0110.00817.86
7.4.130.0120.01116.55
7.4.120.0100.00816.54
7.4.110.0110.00816.51
7.4.100.0130.00516.45
7.4.90.0130.00416.31
7.4.80.0090.01319.39
7.4.70.0120.00616.48
7.4.60.0100.01016.41
7.4.50.0030.00316.48
7.4.40.0070.01122.77
7.4.30.0030.01416.45
7.4.00.0090.00614.96
7.3.330.0030.00313.11
7.3.320.0000.00613.08
7.3.310.0030.00316.41
7.3.300.0030.00316.25
7.3.290.0080.00716.31
7.3.280.0090.00916.32
7.3.270.0120.00517.40
7.3.260.0060.01216.27
7.3.250.0120.00516.48
7.3.240.0160.00616.54
7.3.230.0070.01016.39
7.3.210.0030.01416.26
7.3.200.0090.00919.39
7.3.190.0090.01216.42
7.3.180.0060.00916.54
7.3.170.0090.00716.31
7.3.160.0080.00816.27
7.3.120.0060.00614.84
7.3.10.0120.00416.47
7.3.00.0060.00616.64
7.2.330.0040.01316.61
7.2.320.0090.01316.65
7.2.310.0130.01016.59
7.2.300.0110.00516.64
7.2.290.0100.00616.46
7.2.130.0120.00316.83
7.2.120.0130.01016.66
7.2.110.0110.00717.00
7.2.100.0030.00916.39
7.2.90.0060.00616.57
7.2.80.0030.01016.96
7.2.70.0080.00416.65
7.2.60.0000.00816.70
7.2.50.0140.00716.76
7.2.40.0030.00716.74
7.2.30.0080.00417.07
7.2.20.0050.00516.85
7.2.10.0080.00816.99
7.2.00.0050.00818.11
7.1.250.0130.00015.95
7.1.240.0050.00315.88
7.1.230.0070.00715.55
7.1.220.0060.01015.95
7.1.210.0000.00715.66
7.1.200.0000.01015.68
7.1.190.0000.00915.85
7.1.180.0030.00515.55
7.1.170.0060.00315.91
7.1.160.0070.01015.58
7.1.150.0060.01015.88
7.1.140.0100.00315.91
7.1.130.0200.00015.89
7.1.120.0060.00615.76
7.1.110.0100.01015.91
7.1.100.0010.01017.14
7.1.90.0090.00315.93
7.1.80.0120.00615.82
7.1.70.0030.00816.65
7.1.60.0120.00717.89
7.1.50.0070.01016.38
7.1.40.0040.01115.85
7.1.30.0060.00615.89
7.1.20.0100.01015.82
7.1.10.0180.00315.98
7.1.00.0030.04219.17
7.0.330.0030.01015.35
7.0.320.0030.00615.33
7.0.310.0030.00615.40
7.0.300.0040.01115.54
7.0.290.0070.00315.30
7.0.280.0080.00815.38
7.0.270.0080.00415.35
7.0.260.0070.00315.30
7.0.250.0120.00315.39
7.0.240.0170.00015.40
7.0.230.0120.00315.33
7.0.220.0030.01015.20
7.0.210.0070.01115.41
7.0.200.0070.00516.14
7.0.190.0100.00315.41
7.0.180.0030.00615.58
7.0.170.0130.00315.22
7.0.160.0060.00615.43
7.0.150.0030.01015.49
7.0.140.0030.04218.74
7.0.130.0060.00615.25
7.0.120.0000.01115.53
7.0.110.0000.01115.33
7.0.100.0000.01415.52
7.0.90.0110.00415.50
7.0.80.0130.03817.49
7.0.70.0040.04617.72
7.0.60.0180.04617.71
7.0.50.0400.04317.91
7.0.40.0070.04616.76
7.0.30.0070.04216.75
7.0.20.0030.03116.79
7.0.10.0090.04416.78
7.0.00.0030.04416.69
5.6.380.0040.00814.13
5.6.370.0070.00314.38
5.6.360.0060.01014.40
5.6.350.0060.00914.38
5.6.340.0070.00714.23
5.6.330.0100.00014.16
5.6.320.0030.01014.08
5.6.310.0100.00314.21
5.6.300.0040.00414.35
5.6.290.0080.00314.04
5.6.280.0070.03817.36
5.6.270.0030.01014.46
5.6.260.0030.00914.41
5.6.250.0030.01014.05
5.6.240.0050.00514.20
5.6.230.0120.04017.56
5.6.220.0060.03517.32
5.6.210.0120.02517.44
5.6.200.0050.04417.75
5.6.190.0080.04317.70
5.6.180.0160.03517.79
5.6.170.0070.04117.54
5.6.160.0070.03217.63
5.6.150.0180.03017.71
5.6.140.0120.02817.75
5.6.130.0030.04217.65
5.6.120.0080.04317.75
5.6.110.0070.02517.48
5.6.100.0020.03217.58
5.6.90.0090.02917.57
5.6.80.0080.02617.30
5.6.70.0080.04117.49
5.6.60.0040.04717.29
5.6.50.0140.03917.38
5.6.40.0130.04317.21
5.6.30.0130.03517.32
5.6.20.0120.03717.32
5.6.10.0090.04417.30
5.6.00.0210.04017.36
5.5.380.0060.00610.85
5.5.370.0150.03015.56
5.5.360.0050.04315.68
5.5.350.0040.04715.72
5.5.340.0060.04415.78
5.5.330.0030.05015.84
5.5.320.0080.04515.80
5.5.310.0080.02815.97
5.5.300.0030.04515.78
5.5.290.0070.04715.83
5.5.280.0050.04715.96
5.5.270.0090.03415.90
5.5.260.0080.02315.74
5.5.250.0080.04315.88
5.5.240.0180.03215.57
5.5.230.0090.04215.50
5.5.220.0130.02215.59
5.5.210.0090.03815.51
5.5.200.0100.03215.51
5.5.190.0110.03615.43
5.5.180.0110.02715.39
5.5.170.0060.00610.90
5.5.160.0100.04015.47
5.5.150.0080.03815.64
5.5.140.0120.03515.52
5.5.130.0080.02315.70
5.5.120.0170.03515.49
5.5.110.0130.03515.44
5.5.100.0130.02015.51
5.5.90.0070.04315.42
5.5.80.0150.03315.50
5.5.70.0070.04015.41
5.5.60.0060.04215.53
5.5.50.0080.02515.62
5.5.40.0100.03515.46
5.5.30.0050.02715.45
5.5.20.0090.03315.54
5.5.10.0030.04015.50
5.5.00.0040.02715.35
5.4.450.0060.04215.03
5.4.440.0120.03315.00
5.4.430.0070.02715.10
5.4.420.0060.04515.22
5.4.410.0070.03915.19
5.4.400.0100.03314.97
5.4.390.0060.03615.04
5.4.380.0080.03814.86
5.4.370.0040.04114.80
5.4.360.0050.04114.81
5.4.350.0110.04014.96
5.4.340.0050.02314.94
5.4.330.0150.00311.06
5.4.320.0080.03014.72
5.4.310.0070.04115.03
5.4.300.0020.03015.00
5.4.290.0040.04015.07
5.4.280.0020.04214.88
5.4.270.0070.02314.87
5.4.260.0070.03414.88
5.4.250.0110.02314.71
5.4.240.0080.03314.97
5.4.230.0030.04114.78
5.4.220.0050.04315.03
5.4.210.0030.04615.12
5.4.200.0130.03514.95
5.4.190.0030.04314.95
5.4.180.0090.03514.94
5.4.170.0100.04214.94
5.4.160.0110.04014.96
5.4.150.0120.03914.89
5.4.140.0090.03613.63
5.4.130.0030.03813.61
5.4.120.0130.03513.61
5.4.110.0070.04113.50
5.4.100.0060.03413.68
5.4.90.0050.04013.56
5.4.80.0030.04213.53
5.4.70.0050.02013.54
5.4.60.0060.03813.45
5.4.50.0090.03313.52
5.4.40.0090.03513.67
5.4.30.0040.03713.74
5.4.20.0030.03213.63
5.4.10.0130.03313.53
5.4.00.0030.02813.30
5.3.290.0180.03512.54
5.3.280.0050.04412.47
5.3.270.0090.04112.52
5.3.260.0020.02312.51
5.3.250.0060.04212.56
5.3.240.0050.03112.48
5.3.230.0020.02812.45
5.3.220.0050.04212.45
5.3.210.0080.03812.37
5.3.200.0100.03712.44
5.3.190.0060.04012.45
5.3.180.0130.02312.57
5.3.170.0050.02512.47
5.3.160.0050.04112.51
5.3.150.0020.03212.46
5.3.140.0080.04112.46
5.3.130.0000.04212.36
5.3.120.0030.04212.51
5.3.110.0080.02012.50
5.3.100.0110.03512.11
5.3.90.0080.03712.17
5.3.80.0060.02812.05
5.3.70.0040.04112.13
5.3.60.0070.03512.01
5.3.50.0090.03712.12
5.3.40.0030.02112.13
5.3.30.0050.03312.04
5.3.20.0100.03212.03
5.3.10.0030.03711.96
5.3.00.0070.03811.84
5.2.170.0020.03211.39
5.2.160.0020.03511.39
5.2.150.0030.03411.42
5.2.140.0000.02211.41
5.2.130.0080.03211.50
5.2.120.0060.02511.49
5.2.110.0060.03011.39
5.2.100.0030.03611.43
5.2.90.0070.02311.48
5.2.80.0050.03211.39
5.2.70.0020.02111.40
5.2.60.0080.01811.42
5.2.50.0060.02011.39
5.2.40.0060.01711.46
5.2.30.0020.03511.39
5.2.20.0080.03011.39
5.2.10.0040.03411.39
5.2.00.0030.03311.39
5.1.60.0050.02511.39
5.1.50.0060.02811.39
5.1.40.0080.02611.39
5.1.30.0050.02011.39
5.1.20.0020.02311.39
5.1.10.0010.02111.39
5.1.00.0080.02711.39
5.0.50.0030.02511.39
5.0.40.0060.02211.39
5.0.30.0070.02911.39
5.0.20.0050.02311.39
5.0.10.0050.01711.39
5.0.00.0060.01611.39
4.4.90.0010.01311.39
4.4.80.0020.01511.39
4.4.70.0030.02011.39
4.4.60.0020.02011.39
4.4.50.0010.01911.39
4.4.40.0020.02711.39
4.4.30.0050.01511.39
4.4.20.0020.01411.39
4.4.10.0010.02111.39
4.4.00.0020.03011.39
4.3.110.0020.02311.39
4.3.100.0030.02111.39
4.3.90.0050.01711.39
4.3.80.0030.03011.39
4.3.70.0020.01311.39
4.3.60.0030.01911.39
4.3.50.0040.01311.39
4.3.40.0010.03011.39
4.3.30.0020.02011.39
4.3.20.0060.01711.39
4.3.10.0020.01511.39
4.3.00.0020.02011.39

preferences:
51.56 ms | 401 KiB | 5 Q