3v4l.org

run code in 300+ PHP versions simultaneously
<?php $result = "\xC2°Freen\x18 ew°\x90ɮ\x7F"; //$result="a\xC2"; //$result = preg_replace('~[\x{0000}-\x{000F}\x{007F}-\x{00a0}]~S', '', $result); $result = preg_replace('~[\x{0000}-\x{000F}\x{007F}-\x{00a0}]~i', '', $result); $string = "°Freen\x18 ew°\x90ɮ\x7F\xc2"; $string = preg_replace("#[\x09\x0A\x0D\x20-\x7E]#" ,"",$string); // ASCII $string = preg_replace("#[\xC2-\xDF][\x80-\xBF]#" ,"",$string); // non-overlong 2-byte $string = preg_replace("#\xE0[\xA0-\xBF][\x80-\xBF]#" ,"",$string); // excluding overlongs $string = preg_replace("#[\xE1-\xEC\xEE\xEF][\x80-\xBF]{2}#","",$string); // straight 3-byte $string = preg_replace("#\xED[\x80-\x9F][\x80-\xBF]#" ,"",$string); // excluding surrogates $string = preg_replace("#\xF0[\x90-\xBF][\x80-\xBF]{2}#","",$string); // planes 1-3 $string = preg_replace("#[\xF1-\xF3][\x80-\xBF]{3}#" ,"",$string); // planes 4-15 $string = preg_replace("#\xF4[\x80-\x8F][\x80-\xBF]{2}#","",$string); // plane 16 /* //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 ); */ $result = str_replace("\xC2", "", $result); if($result == "\xC2") echo 'fuck'; 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.00718.30
8.3.50.0110.00721.99
8.3.40.0120.00318.87
8.3.30.0040.01118.79
8.3.20.0040.00418.77
8.3.10.0030.00620.95
8.3.00.0000.00723.53
8.2.180.0160.00316.63
8.2.170.0070.01422.96
8.2.160.0070.01022.24
8.2.150.0030.00524.18
8.2.140.0000.00824.66
8.2.130.0090.00026.16
8.2.120.0040.00421.07
8.2.110.0090.00020.40
8.2.100.0000.01117.97
8.2.90.0000.00819.27
8.2.80.0030.00517.97
8.2.70.0060.00317.75
8.2.60.0040.00417.92
8.2.50.0030.00618.07
8.2.40.0050.00318.28
8.2.30.0000.00821.17
8.2.20.0080.00017.77
8.2.10.0040.00417.85
8.2.00.0030.00517.93
8.1.280.0080.01225.92
8.1.270.0000.00723.99
8.1.260.0050.00326.35
8.1.250.0070.00028.09
8.1.240.0030.00622.45
8.1.230.0110.00021.02
8.1.220.0080.00018.77
8.1.210.0030.00519.23
8.1.200.0000.01117.48
8.1.190.0040.00417.30
8.1.180.0000.00818.10
8.1.170.0060.00318.90
8.1.160.0070.00018.87
8.1.150.0030.00618.71
8.1.140.0040.00417.54
8.1.130.0000.00817.99
8.1.120.0070.00017.68
8.1.110.0000.00817.67
8.1.100.0030.00517.64
8.1.90.0070.00017.66
8.1.80.0050.00317.68
8.1.70.0050.00217.59
8.1.60.0030.00617.73
8.1.50.0040.00417.64
8.1.40.0030.00517.70
8.1.30.0030.00517.81
8.1.20.0060.00317.79
8.1.10.0020.00517.68
8.1.00.0080.00017.64
8.0.300.0040.00420.07
8.0.290.0000.00817.16
8.0.280.0030.00318.50
8.0.270.0040.00417.32
8.0.260.0000.00716.89
8.0.250.0050.00317.05
8.0.240.0070.00317.03
8.0.230.0040.00417.13
8.0.220.0070.00016.99
8.0.210.0030.00317.02
8.0.200.0040.00417.10
8.0.190.0030.00417.04
8.0.180.0050.00216.92
8.0.170.0030.00316.94
8.0.160.0040.00417.09
8.0.150.0070.00016.97
8.0.140.0000.00717.02
8.0.130.0000.00713.37
8.0.120.0000.00716.87
8.0.110.0050.00216.86
8.0.100.0020.00516.95
8.0.90.0040.00416.86
8.0.80.0090.00616.93
8.0.70.0050.00217.13
8.0.60.0040.00416.86
8.0.50.0040.00416.92
8.0.30.0110.00917.38
8.0.20.0130.00617.48
8.0.10.0040.00417.09
8.0.00.0150.00317.04
7.4.330.0030.00314.93
7.4.320.0000.00616.85
7.4.300.0030.00316.76
7.4.290.0030.00316.73
7.4.280.0070.00016.82
7.4.270.0040.00416.73
7.4.260.0050.00013.63
7.4.250.0050.00216.61
7.4.240.0030.00516.78
7.4.230.0000.00716.75
7.4.220.0090.00916.73
7.4.210.0080.01016.83
7.4.200.0000.00716.82
7.4.190.0050.00317.02
7.4.160.0040.01116.86
7.4.150.0110.00717.40
7.4.140.0100.01017.86
7.4.130.0080.01216.83
7.4.120.0070.01016.73
7.4.110.0060.01016.86
7.4.100.0100.01416.66
7.4.90.0200.00316.67
7.4.80.0030.01519.39
7.4.70.0150.00416.82
7.4.60.0130.00316.62
7.4.50.0000.00916.75
7.4.40.0030.01322.77
7.4.30.0100.00816.61
7.4.00.0070.01015.29
7.3.330.0050.00013.23
7.3.320.0030.00313.26
7.3.310.0000.00716.41
7.3.300.0030.00316.27
7.3.290.0070.00716.41
7.3.280.0090.00816.40
7.3.270.0080.00817.40
7.3.260.0080.00918.24
7.3.250.0120.00416.61
7.3.240.0060.01016.64
7.3.230.0110.00716.78
7.3.210.0060.01516.74
7.3.200.0100.01319.39
7.3.190.0130.00416.70
7.3.180.0060.01016.57
7.3.170.0030.01216.42
7.3.160.0090.00916.63
7.3.120.0070.01014.92
7.3.110.0070.00914.87
7.3.100.0060.00814.91
7.3.90.0030.01214.97
7.3.80.0090.00414.73
7.3.70.0050.00814.95
7.3.60.0080.00614.81
7.3.50.0060.00415.01
7.3.40.0110.00314.97
7.3.30.0070.01014.78
7.3.20.0090.00516.51
7.3.10.0060.00616.52
7.3.00.0030.01116.56
7.2.330.0120.00916.68
7.2.320.0090.00916.64
7.2.310.0100.00616.69
7.2.300.0030.01516.63
7.2.290.0030.01516.70
7.2.250.0070.01115.29
7.2.240.0080.01015.14
7.2.230.0050.00715.06
7.2.220.0040.01215.27
7.2.210.0040.01015.11
7.2.200.0070.00914.98
7.2.190.0060.00615.20
7.2.180.0050.00815.18
7.2.170.0040.01315.16
7.2.130.0150.00416.90
7.2.120.0140.00016.89
7.2.110.0130.00016.46
7.2.100.0000.01416.64
7.2.90.0110.00716.93
7.2.80.0030.01016.59
7.2.70.0090.00616.76
7.2.60.0110.00816.92
7.2.50.0000.01016.74
7.2.40.0070.00717.07
7.2.30.0040.01116.84
7.2.20.0120.00617.11
7.2.10.0100.00716.80
7.2.00.0030.00917.05
7.1.330.0070.01016.01
7.1.320.0050.00515.90
7.1.310.0050.00516.16
7.1.300.0040.00616.05
7.1.290.0110.00215.93
7.1.280.0090.00515.77
7.1.270.0050.00715.93
7.1.260.0050.00715.93
7.1.250.0120.00616.13
7.1.70.0030.00617.30
7.1.60.0070.01819.40
7.1.50.0060.00617.15
7.1.00.0130.06022.33
7.0.200.0000.00816.89
7.0.140.0070.07022.02
7.0.60.0230.07321.83
7.0.50.0030.04317.94
7.0.40.0070.04019.99
7.0.30.0330.07720.20
7.0.20.0330.08020.11
7.0.10.0100.04320.06
7.0.00.0000.04720.04
5.6.280.0030.07320.92
5.6.210.0130.03720.70
5.6.200.0130.06018.15
5.6.190.0170.07320.27
5.6.180.0200.05320.77
5.6.170.0270.08320.50
5.6.160.0030.04720.48
5.6.150.0070.06718.17
5.6.140.0070.08318.18
5.6.130.0100.06318.11
5.6.120.0030.06720.98
5.6.110.0170.07721.13
5.6.100.0100.08721.13
5.6.90.0030.04720.96
5.6.80.0130.03020.50
5.5.350.0200.04320.38
5.5.340.0100.07717.98
5.5.330.0100.08020.06
5.5.320.0300.06720.17
5.5.310.0230.06320.29
5.5.300.0070.03717.95
5.5.290.0070.06717.98
5.5.280.0030.08020.73
5.5.270.0100.06720.76
5.5.260.0100.08320.78
5.5.250.0130.07320.58
5.5.240.0200.07720.27
5.4.450.4070.04019.46
5.4.440.3130.03719.38
5.4.430.3870.04019.19
5.4.420.3730.03719.48
5.4.410.3900.03319.32
5.4.400.3770.04019.12
5.4.390.0100.05719.12
5.4.380.3670.03719.16
5.4.370.3870.03319.24
5.4.360.4600.03718.86
5.4.350.3970.03719.15
5.4.340.3730.04718.91
5.4.320.3330.03019.13
5.4.310.0200.06019.13
5.4.300.4330.03318.86
5.4.290.4330.04018.96
5.4.280.3870.03719.13
5.4.270.3700.03319.07
5.4.260.3800.03719.04
5.4.250.3970.03319.01
5.4.240.3870.03719.12
5.4.230.4600.03319.03
5.4.220.4270.03019.07
5.4.210.3500.04318.99
5.4.200.3570.03718.86
5.4.190.4030.03318.85
5.4.180.4200.03719.11
5.4.170.4170.04018.98
5.4.160.4200.04019.13
5.4.150.3900.04019.14
5.4.140.3770.03716.23
5.4.130.3830.03016.43
5.4.120.4430.02716.45
5.4.110.3730.03316.22
5.4.100.4330.04016.46
5.4.90.3430.03316.33
5.4.80.3370.03716.21
5.4.70.3570.03316.31
5.4.60.4870.03316.38
5.4.50.3630.03716.30
5.4.40.3900.03316.36
5.4.30.3830.03016.31
5.4.20.3700.03716.29
5.4.10.3600.03316.51
5.4.00.3670.03015.79
5.3.290.0000.04014.45
5.3.280.4670.04014.49
5.3.270.4270.04314.54
5.3.260.3570.04014.55
5.3.250.4200.03314.57
5.3.240.3630.03714.43
5.3.230.3630.03714.69
5.3.220.3700.03714.55
5.3.210.3700.03714.53
5.3.200.3730.03014.53
5.3.190.3730.03314.52
5.3.180.3630.03714.50
5.3.170.3670.03714.49
5.3.160.3700.04014.49
5.3.150.3770.03714.51
5.3.140.3930.04014.45
5.3.130.4100.03314.47
5.3.120.3700.04014.43
5.3.110.3670.03014.49
5.3.100.3800.04313.96
5.3.90.4370.04013.94
5.3.80.3900.03313.98
5.3.70.4200.03713.95
5.3.60.3400.03713.95
5.3.50.3770.04013.90
5.3.40.3670.02713.91
5.3.30.3570.03713.93
5.3.20.3970.03013.63
5.3.10.4570.03713.62
5.3.00.4330.03713.57
5.2.170.3070.02311.30
5.2.160.3130.02711.14
5.2.150.3200.03011.09
5.2.140.3370.03311.30
5.2.130.3270.02711.04
5.2.120.3770.03310.98
5.2.110.3900.03311.10
5.2.100.3700.03010.95
5.2.90.3370.02711.02
5.2.80.3430.03010.97
5.2.70.3200.02711.08
5.2.60.3730.02710.91
5.2.50.3970.02710.87
5.2.40.2700.03010.88
5.2.30.2400.03010.95
5.2.20.2670.03310.90
5.2.10.2730.02310.76
5.2.00.2630.03010.79
5.1.60.2770.0239.99
5.1.50.2470.0239.99
5.1.40.2830.0279.82
5.1.30.3000.02710.34
5.1.20.2470.03010.34
5.1.10.3130.02310.05
5.1.00.3070.0279.97
5.0.50.1770.0209.68
5.0.40.1470.0239.68
5.0.30.1200.0339.68
5.0.20.1630.0209.68
5.0.10.1570.0179.68
5.0.00.1500.0309.68
4.4.90.1630.0179.68
4.4.80.0900.0279.68
4.4.70.1470.0179.68
4.4.60.1600.0079.68
4.4.50.1500.0209.68
4.4.40.1470.0279.68
4.4.30.1300.0179.68
4.4.20.1900.0179.68
4.4.10.1730.0179.68
4.4.00.1630.0279.68
4.3.110.1430.0139.68
4.3.100.1430.0109.68
4.3.90.1830.0139.68
4.3.80.1170.0209.68
4.3.70.1970.0139.68
4.3.60.1500.0139.68
4.3.50.1730.0179.68
4.3.40.1800.0209.68
4.3.30.0770.0179.68
4.3.20.0900.0179.68
4.3.10.0930.0209.68
4.3.00.0800.0139.68

preferences:
52.51 ms | 400 KiB | 5 Q