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}]~u', '?', $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 ); */ 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.0100.01018.68
8.3.50.0210.01122.17
8.3.40.0040.01818.97
8.3.30.0070.00720.34
8.3.20.0110.00720.05
8.3.10.0100.01022.09
8.3.00.0070.00722.52
8.2.180.0100.01016.50
8.2.170.0060.01122.96
8.2.160.0100.01022.33
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0060.01326.16
8.2.120.0060.00319.66
8.2.110.0030.00622.38
8.2.100.0000.01219.46
8.2.90.0030.00718.98
8.2.80.0000.00819.34
8.2.70.0030.00717.88
8.2.60.0000.00817.79
8.2.50.0060.00318.07
8.2.40.0040.00718.22
8.2.30.0030.00518.04
8.2.20.0060.00317.73
8.2.10.0080.00017.89
8.2.00.0090.00017.93
8.1.280.0140.00425.92
8.1.270.0000.00724.66
8.1.260.0040.01426.35
8.1.250.0110.00328.09
8.1.240.0070.00423.84
8.1.230.0040.00819.10
8.1.220.0080.00017.78
8.1.210.0080.00018.77
8.1.200.0100.00017.50
8.1.190.0040.00417.39
8.1.180.0040.00418.10
8.1.170.0030.00518.78
8.1.160.0000.00722.09
8.1.150.0000.00718.78
8.1.140.0050.00317.52
8.1.130.0030.00317.89
8.1.120.0040.00417.46
8.1.110.0000.00717.59
8.1.100.0040.00417.65
8.1.90.0050.00317.61
8.1.80.0040.00417.63
8.1.70.0000.00817.64
8.1.60.0060.00317.70
8.1.50.0000.00717.72
8.1.40.0000.00817.57
8.1.30.0040.00417.73
8.1.20.0050.00317.78
8.1.10.0050.00217.71
8.1.00.0040.00417.50
8.0.300.0040.00418.77
8.0.290.0020.00517.17
8.0.280.0030.00518.47
8.0.270.0040.00417.30
8.0.260.0000.00717.08
8.0.250.0030.00517.16
8.0.240.0000.00817.09
8.0.230.0000.00717.11
8.0.220.0000.00817.00
8.0.210.0000.00716.97
8.0.200.0030.00317.15
8.0.190.0000.00717.10
8.0.180.0070.00017.02
8.0.170.0040.00417.04
8.0.160.0030.00517.02
8.0.150.0000.00717.05
8.0.140.0040.00417.07
8.0.130.0040.00413.63
8.0.120.0090.00017.10
8.0.110.0040.00417.01
8.0.100.0040.00417.22
8.0.90.0040.00416.97
8.0.80.0070.01317.18
8.0.70.0000.00717.18
8.0.60.0030.00517.12
8.0.50.0030.00516.99
8.0.30.0090.01017.38
8.0.20.0120.00817.40
8.0.10.0040.00417.05
8.0.00.0100.00917.09
7.4.330.0030.00315.00
7.4.320.0000.00616.82
7.4.300.0070.00316.82
7.4.290.0000.00716.81
7.4.280.0070.00016.62
7.4.270.0030.00316.67
7.4.260.0000.00716.78
7.4.250.0000.00716.79
7.4.240.0000.00716.83
7.4.230.0000.00716.93
7.4.220.0000.01916.69
7.4.210.0060.00916.77
7.4.200.0000.00716.73
7.4.190.0040.00416.67
7.4.160.0030.01316.67
7.4.150.0110.00617.40
7.4.140.0070.01317.86
7.4.130.0080.00916.83
7.4.120.0120.00816.85
7.4.110.0130.00316.69
7.4.100.0170.00316.64
7.4.90.0120.00616.55
7.4.80.0120.00919.39
7.4.70.0100.00716.57
7.4.60.0110.00616.65
7.4.50.0040.00416.47
7.4.40.0150.00322.77
7.4.30.0070.01016.76
7.4.00.0080.00015.19
7.3.330.0000.00513.39
7.3.320.0050.00013.29
7.3.310.0070.00016.47
7.3.300.0000.00816.40
7.3.290.0000.01616.45
7.3.280.0060.00916.46
7.3.270.0070.01017.40
7.3.260.0060.01216.32
7.3.250.0100.00716.59
7.3.240.0090.01416.44
7.3.230.0070.01016.68
7.3.210.0060.00916.61
7.3.200.0100.00619.39
7.3.190.0100.00716.46
7.3.180.0060.01316.64
7.3.170.0030.01216.65
7.3.160.0040.01416.54
7.3.120.0030.01415.02
7.3.00.0000.01316.91
7.2.330.0120.00616.59
7.2.320.0200.00316.84
7.2.310.0040.01316.69
7.2.300.0140.00416.61
7.2.290.0040.01216.73
7.2.130.0100.00716.97
7.2.120.0090.01017.09
7.2.110.0090.00617.17
7.2.100.0060.00317.17
7.2.90.0030.00916.85
7.2.80.0090.00617.11
7.2.70.0100.00316.87
7.2.60.0060.00917.11
7.2.50.0030.01316.71
7.2.40.0070.01017.04
7.2.30.0070.00716.88
7.2.20.0030.01416.99
7.2.10.0030.01117.10
7.2.00.0070.00618.30
7.1.250.0130.00316.09
7.1.240.0030.01316.02
7.1.230.0100.00316.10
7.1.220.0070.00415.86
7.1.210.0060.01015.91
7.1.200.0030.01015.89
7.1.190.0100.00316.06
7.1.180.0110.00416.03
7.1.170.0060.00915.77
7.1.160.0060.00616.22
7.1.150.0070.00715.95
7.1.140.0130.00015.98
7.1.130.0070.00716.14
7.1.120.0060.00915.74
7.1.110.0000.01116.01
7.1.100.0060.00816.96
7.1.90.0030.01015.72
7.1.80.0030.01316.04
7.1.70.0070.00216.64
7.1.60.0040.01417.74
7.1.50.0040.01416.63
7.1.40.0090.00015.96
7.1.30.0060.01016.04
7.1.20.0040.01116.14
7.1.10.0070.00715.95
7.1.00.0030.02319.21
7.0.330.0030.00515.54
7.0.320.0040.01115.62
7.0.310.0060.00915.71
7.0.300.0060.00615.45
7.0.290.0110.00415.47
7.0.280.0060.00915.77
7.0.270.0060.00315.73
7.0.260.0030.01015.44
7.0.250.0060.00715.67
7.0.240.0110.00015.64
7.0.230.0040.01115.77
7.0.220.0030.01015.52
7.0.210.0080.00315.68
7.0.200.0070.00516.32
7.0.190.0000.01015.57
7.0.180.0110.00415.78
7.0.170.0060.00915.81
7.0.160.0000.01415.45
7.0.150.0060.00615.43
7.0.140.0020.04418.81
7.0.130.0090.00615.55
7.0.120.0060.00615.45
7.0.110.0100.00315.59
7.0.100.0090.02917.69
7.0.90.0040.02817.73
7.0.80.0100.01717.65
7.0.70.0180.02017.82
7.0.60.0050.02617.67
7.0.50.0200.04017.93
7.0.40.0050.03516.76
7.0.30.0120.03516.95
7.0.20.0090.04016.97
7.0.10.0040.02816.92
7.0.00.0030.05016.85
5.6.380.0030.01014.68
5.6.370.0040.00714.42
5.6.360.0030.01214.33
5.6.350.0080.00414.42
5.6.340.0120.00614.58
5.6.330.0030.00914.26
5.6.320.0120.00314.38
5.6.310.0030.01014.71
5.6.300.0100.00313.85
5.6.290.0070.00714.64
5.6.280.0020.04217.64
5.6.270.0070.00714.17
5.6.260.0030.00714.45
5.6.250.0060.02617.29
5.6.240.0020.02417.48
5.6.230.0040.02117.48
5.6.220.0060.01817.45
5.6.210.0050.02117.45
5.6.200.0060.03017.89
5.6.190.0110.04417.78
5.6.180.0140.03917.78
5.6.170.0050.04317.70
5.6.160.0080.04417.72
5.6.150.0080.04517.78
5.6.140.0100.04517.67
5.6.130.0070.02217.57
5.6.120.0070.03817.76
5.6.110.0100.04017.61
5.6.100.0050.04317.58
5.6.90.0100.04717.73
5.6.80.0070.04317.35
5.6.70.0020.05017.49
5.6.60.0080.02517.41
5.6.50.0060.02517.30
5.6.40.0080.04417.52
5.6.30.0050.03017.26
5.6.20.0130.02017.35
5.6.10.0090.02117.31
5.6.00.0070.04017.53
5.5.380.0020.02415.79
5.5.370.0070.02215.86
5.5.360.0040.02415.80
5.5.350.0070.01715.75
5.5.340.0070.04116.06
5.5.330.0110.03515.95
5.5.320.0110.02616.02
5.5.310.0080.02616.02
5.5.300.0030.02516.02
5.5.290.0070.04215.97
5.5.280.0080.04616.05
5.5.270.0030.03815.97
5.5.260.0030.03715.98
5.5.250.0050.04315.88
5.5.240.0060.02615.62
5.5.230.0120.03915.67
5.5.220.0050.02215.72
5.5.210.0110.03815.71
5.5.200.0050.04515.73
5.5.190.0070.04015.68
5.5.180.0080.03015.73
5.5.170.0060.00611.18
5.5.160.0020.03615.64
5.5.150.0070.03215.72
5.5.140.0090.04015.70
5.5.130.0000.04615.72
5.5.120.0030.04215.67
5.5.110.0040.04815.64
5.5.100.0050.04015.68
5.5.90.0050.03215.61
5.5.80.0060.03815.65
5.5.70.0020.04715.61
5.5.60.0120.03715.63
5.5.50.0080.03515.63
5.5.40.0040.02615.66
5.5.30.0030.02715.63
5.5.20.0050.04615.60
5.5.10.0030.04415.57
5.5.00.0080.03815.58
5.4.450.0020.04015.24
5.4.440.0070.04015.15
5.4.430.0020.03015.31
5.4.420.0090.02815.26
5.4.410.0030.04015.18
5.4.400.0020.04115.00
5.4.390.0070.02714.98
5.4.380.0060.04115.08
5.4.370.0050.02615.13
5.4.360.0050.03915.00
5.4.350.0120.03014.99
5.4.340.0100.03715.12
5.4.330.0040.00711.18
5.4.320.0070.04015.10
5.4.310.0050.03415.10
5.4.300.0050.02615.06
5.4.290.0080.03815.14
5.4.280.0050.02315.15
5.4.270.0080.03515.00
5.4.260.0080.03715.12
5.4.250.0080.03615.15
5.4.240.0040.04115.07
5.4.230.0120.03714.99
5.4.220.0110.03815.20
5.4.210.0050.03715.13
5.4.200.0070.03615.08
5.4.190.0060.03015.03
5.4.180.0020.03815.11
5.4.170.0100.04015.11
5.4.160.0030.02915.09
5.4.150.0100.03715.09
5.4.140.0060.04113.73
5.4.130.0090.03413.72
5.4.120.0030.03013.77
5.4.110.0070.03813.74
5.4.100.0040.04113.80
5.4.90.0070.02013.80
5.4.80.0060.02513.79
5.4.70.0000.03213.73
5.4.60.0080.03013.73
5.4.50.0080.02513.79
5.4.40.0070.03913.82
5.4.30.0020.03213.70
5.4.20.0070.04013.75
5.4.10.0030.02613.70
5.4.00.0020.04213.45
5.3.290.0060.03212.92
5.3.280.0070.04012.81
5.3.270.0080.04012.87
5.3.260.0060.03612.88
5.3.250.0030.04412.88
5.3.240.0030.02512.88
5.3.230.0080.03812.88
5.3.220.0090.03512.82
5.3.210.0070.03412.85
5.3.200.0080.01712.82
5.3.190.0050.04412.86
5.3.180.0070.03812.82
5.3.170.0120.03212.85
5.3.160.0020.03612.84
5.3.150.0070.04012.84
5.3.140.0060.03212.80
5.3.130.0030.03412.81
5.3.120.0030.04012.79
5.3.110.0080.02212.79
5.3.100.0000.04812.60
5.3.90.0040.04212.55
5.3.80.0020.03512.59
5.3.70.0080.04012.59
5.3.60.0070.02812.58
5.3.50.0050.03812.55
5.3.40.0030.04212.55
5.3.30.0050.02312.52
5.3.20.0060.04012.31
5.3.10.0050.04012.39
5.3.00.0080.01812.39
5.2.170.0030.02211.18
5.2.160.0000.03011.08
5.2.150.0060.03511.05
5.2.140.0030.02811.07
5.2.130.0070.02811.13
5.2.120.0050.02811.13
5.2.110.0050.03211.03
5.2.100.0010.02311.13
5.2.90.0070.02811.10
5.2.80.0040.02711.13
5.2.70.0100.02611.13
5.2.60.0060.02011.07
5.2.50.0040.02011.12
5.2.40.0010.02111.08
5.2.30.0080.02111.10
5.2.20.0030.03511.01
5.2.10.0030.03111.04
5.2.00.0060.01910.95
5.1.60.0030.02810.60
5.1.50.0030.02810.60
5.1.40.0060.02710.59
5.1.30.0050.02810.68
5.1.20.0100.02410.80
5.1.10.0070.02410.60
5.1.00.0010.02610.54
5.0.50.0050.0209.88
5.0.40.0020.0259.71
5.0.30.0030.0349.73
5.0.20.0060.0119.61
5.0.10.0000.0189.67
5.0.00.0060.0309.67
4.4.90.0020.0179.56
4.4.80.0040.0209.56
4.4.70.0020.0189.56
4.4.60.0040.0189.56
4.4.50.0050.0139.56
4.4.40.0020.0279.56
4.4.30.0030.0189.56
4.4.20.0030.0189.56
4.4.10.0000.0189.56
4.4.00.0030.0269.56
4.3.110.0020.0179.56
4.3.100.0020.0199.56
4.3.90.0030.0169.56
4.3.80.0000.0239.56
4.3.70.0030.0099.56
4.3.60.0000.0149.56
4.3.50.0030.0189.56
4.3.40.0050.0169.56
4.3.30.0040.0089.56
4.3.20.0000.0209.56
4.3.10.0020.0199.56
4.3.00.0000.0159.56

preferences:
45 ms | 401 KiB | 5 Q