3v4l.org

run code in 300+ PHP versions simultaneously
<?php $result = "°Freen\x18 ew°\x90ɮ\xa0"; $result = preg_replace('~[\x{0000}-\x{001F}\x{007F}-\x{00a0}]~', '', $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.0090.00618.20
8.3.50.0110.00922.17
8.3.40.0070.00719.09
8.3.30.0130.00618.76
8.3.20.0000.01018.75
8.3.10.0080.00021.09
8.3.00.0060.00321.78
8.2.180.0090.01216.88
8.2.170.0090.00922.96
8.2.160.0070.00720.43
8.2.150.0000.00824.18
8.2.140.0070.00024.66
8.2.130.0000.00726.16
8.2.120.0000.00719.61
8.2.110.0030.00622.25
8.2.100.0100.00617.97
8.2.90.0040.00419.05
8.2.80.0000.00817.97
8.2.70.0000.00817.75
8.2.60.0040.00417.93
8.2.50.0050.00318.10
8.2.40.0000.01020.63
8.2.30.0020.00519.75
8.2.20.0000.00717.84
8.2.10.0040.00417.81
8.2.00.0040.00717.77
8.1.280.0070.00725.92
8.1.270.0070.00023.99
8.1.260.0000.00826.35
8.1.250.0070.00028.09
8.1.240.0030.00619.34
8.1.230.0040.00817.57
8.1.220.0030.00617.74
8.1.210.0060.00318.77
8.1.200.0060.00317.48
8.1.190.0040.00417.41
8.1.180.0000.00818.10
8.1.170.0040.00418.72
8.1.160.0040.00422.16
8.1.150.0080.00018.71
8.1.140.0000.00717.54
8.1.130.0000.00717.85
8.1.120.0020.00517.43
8.1.110.0070.00417.53
8.1.100.0000.00717.47
8.1.90.0070.00017.43
8.1.80.0000.00717.55
8.1.70.0070.00417.47
8.1.60.0030.00617.67
8.1.50.0000.00817.54
8.1.40.0080.00017.57
8.1.30.0040.00417.73
8.1.20.0080.00017.67
8.1.10.0000.00717.64
8.1.00.0030.00617.58
8.0.300.0000.00718.77
8.0.290.0040.00416.88
8.0.280.0030.00318.46
8.0.270.0000.00717.20
8.0.260.0030.00316.96
8.0.250.0040.00417.00
8.0.240.0030.00617.11
8.0.230.0000.00716.94
8.0.220.0050.00216.96
8.0.210.0030.00316.98
8.0.200.0000.00717.00
8.0.190.0070.00016.94
8.0.180.0040.00417.01
8.0.170.0000.00717.02
8.0.160.0000.00816.93
8.0.150.0000.00816.95
8.0.140.0050.00316.90
8.0.130.0050.00013.48
8.0.120.0000.00816.92
8.0.110.0050.00316.84
8.0.100.0040.00417.08
8.0.90.0000.00716.80
8.0.80.0040.01216.96
8.0.70.0000.00817.09
8.0.60.0030.00516.96
8.0.50.0050.00216.83
8.0.30.0090.01017.33
8.0.20.0140.00717.40
8.0.10.0000.00716.96
8.0.00.0150.00616.76
7.4.330.0000.00613.43
7.4.320.0000.00616.72
7.4.300.0000.00616.71
7.4.290.0000.00716.65
7.4.280.0040.00416.70
7.4.270.0000.00716.71
7.4.260.0050.00013.45
7.4.250.0070.00316.65
7.4.240.0030.00316.66
7.4.230.0040.00416.49
7.4.220.0130.00616.75
7.4.210.0070.00916.71
7.4.200.0040.00416.49
7.4.190.0070.00016.84
7.4.160.0110.00416.50
7.4.150.0030.01417.40
7.4.140.0090.01017.86
7.4.130.0070.01016.75
7.4.120.0130.00416.59
7.4.110.0070.01116.62
7.4.100.0080.01616.38
7.4.90.0110.01116.72
7.4.80.0070.01719.37
7.4.70.0090.00616.77
7.4.60.0120.00316.39
7.4.50.0040.00416.51
7.4.40.0080.00422.27
7.4.30.0140.00916.74
7.4.00.0060.00915.25
7.3.330.0050.00013.22
7.3.320.0000.00613.25
7.3.310.0040.00416.30
7.3.300.0000.00616.36
7.3.290.0000.01816.37
7.3.280.0080.00816.33
7.3.270.0070.01017.40
7.3.260.0090.00918.24
7.3.250.0160.00516.47
7.3.240.0120.00616.43
7.3.230.0130.00316.79
7.3.210.0120.00316.74
7.3.200.0070.01019.39
7.3.190.0140.00316.38
7.3.180.0130.00316.56
7.3.170.0060.00916.60
7.3.160.0090.00916.75
7.3.120.0070.00714.66
7.3.00.0150.00416.75
7.2.330.0100.00716.69
7.2.320.0060.01016.66
7.2.310.0000.01616.64
7.2.300.0030.01816.61
7.2.290.0160.00016.65
7.2.130.0090.00917.00
7.2.120.0180.00316.84
7.2.110.0090.00916.66
7.2.100.0110.00516.89
7.2.90.0100.01416.89
7.2.80.0100.01016.95
7.2.70.0120.00816.64
7.2.60.0150.00316.99
7.2.50.0130.00717.04
7.2.40.0110.00416.87
7.2.30.0160.00316.80
7.2.20.0100.01316.82
7.2.10.0150.00316.89
7.2.00.0050.01018.27
7.1.250.0090.00015.86
7.1.240.0150.00316.02
7.1.230.0040.01115.77
7.1.220.0070.01415.85
7.1.210.0100.00715.82
7.1.200.0120.00615.84
7.1.190.0100.00715.77
7.1.180.0140.00315.98
7.1.170.0090.00515.89
7.1.160.0130.00315.85
7.1.150.0080.01115.64
7.1.140.0200.00315.82
7.1.130.0170.00715.66
7.1.120.0110.00815.86
7.1.110.0100.00715.90
7.1.100.0060.00917.03
7.1.90.0070.01015.98
7.1.80.0160.00315.81
7.1.70.0110.00316.29
7.1.60.0090.00917.63
7.1.50.0090.00816.47
7.1.40.0130.00715.94
7.1.30.0040.01115.79
7.1.20.0120.00915.75
7.1.10.0120.00615.82
7.1.00.0050.04219.05
7.0.330.0120.00615.39
7.0.320.0030.01115.52
7.0.310.0100.00315.13
7.0.300.0090.00615.66
7.0.290.0140.00615.17
7.0.280.0140.00415.30
7.0.270.0110.00715.65
7.0.260.0080.00615.55
7.0.250.0070.01015.49
7.0.240.0090.01215.58
7.0.230.0130.00615.40
7.0.220.0110.00715.57
7.0.210.0140.00415.24
7.0.200.0070.00616.15
7.0.190.0120.00015.47
7.0.180.0160.00015.34
7.0.170.0180.00015.37
7.0.160.0040.01215.20
7.0.150.0120.00315.21
7.0.140.0090.03818.91
7.0.130.0150.00415.17
7.0.120.0100.00315.65
7.0.110.0100.01015.28
7.0.100.0120.00315.57
7.0.90.0090.00615.20
7.0.80.0180.00015.26
7.0.70.0090.03418.67
7.0.60.0080.04318.65
7.0.50.0070.03518.88
7.0.40.0140.03516.79
7.0.30.0090.03316.75
7.0.20.0000.05216.87
7.0.10.0130.03716.68
7.0.00.0090.04216.69
5.6.380.0030.00914.38
5.6.370.0030.00714.36
5.6.360.0030.01114.02
5.6.350.0120.00414.05
5.6.340.0030.01113.78
5.6.330.0030.01213.95
5.6.320.0140.00314.01
5.6.310.0060.00913.97
5.6.300.0080.00414.55
5.6.290.0070.01014.32
5.6.280.0080.03817.52
5.6.270.0100.00314.23
5.6.260.0040.01214.11
5.6.250.0100.00714.13
5.6.240.0030.00614.45
5.6.230.0090.00613.96
5.6.220.0070.04517.34
5.6.210.0050.04517.39
5.6.200.0070.04417.60
5.6.190.0040.04417.61
5.6.180.0080.04417.56
5.6.170.0060.03317.54
5.6.160.0090.03917.56
5.6.150.0050.05017.54
5.6.140.0030.03517.59
5.6.130.0090.04517.71
5.6.120.0080.02817.52
5.6.110.0060.04217.61
5.6.100.0080.02917.42
5.6.90.0060.02717.73
5.6.80.0060.03917.49
5.6.70.0090.04217.32
5.6.60.0060.02617.27
5.6.50.0060.03917.25
5.6.40.0040.03117.22
5.6.30.0020.04817.26
5.6.20.0090.03517.14
5.6.10.0030.02817.34
5.6.00.0070.03317.16
5.5.380.0080.00410.99
5.5.370.0100.00010.84
5.5.360.0080.03815.67
5.5.350.0090.03115.54
5.5.340.0080.03515.83
5.5.330.0050.04615.73
5.5.320.0110.03415.82
5.5.310.0040.04115.74
5.5.300.0060.04515.68
5.5.290.0060.04115.97
5.5.280.0080.02515.91
5.5.270.0020.02515.88
5.5.260.0050.04215.90
5.5.250.0020.04815.64
5.5.240.0020.02515.39
5.5.230.0030.03615.69
5.5.220.0030.03815.53
5.5.210.0000.03515.56
5.5.200.0100.03815.41
5.5.190.0050.03115.43
5.5.180.0050.04315.52
5.5.170.0000.00811.19
5.5.160.0060.04115.40
5.5.150.0070.03715.55
5.5.140.0020.04415.56
5.5.130.0130.02815.43
5.5.120.0120.03515.58
5.5.110.0060.04415.53
5.5.100.0050.04115.40
5.5.90.0120.03715.60
5.5.80.0030.03815.52
5.5.70.0110.03815.54
5.5.60.0100.02815.48
5.5.50.0080.02415.33
5.5.40.0070.02215.36
5.5.30.0040.04715.50
5.5.20.0080.02815.57
5.5.10.0050.04215.48
5.5.00.0070.03315.47
5.4.450.0020.04215.24
5.4.440.0050.02314.80
5.4.430.0020.02415.14
5.4.420.0030.02615.00
5.4.410.0050.02115.15
5.4.400.0020.02414.88
5.4.390.0050.04314.86
5.4.380.0030.02714.77
5.4.370.0010.03314.99
5.4.360.0050.04314.99
5.4.350.0050.03115.07
5.4.340.0050.03515.13
5.4.330.0030.00710.76
5.4.320.0070.03814.90
5.4.310.0030.03715.05
5.4.300.0050.03015.06
5.4.290.0030.04014.85
5.4.280.0090.04115.07
5.4.270.0070.03714.85
5.4.260.0040.03315.12
5.4.250.0050.03614.84
5.4.240.0030.04214.86
5.4.230.0050.04214.93
5.4.220.0070.04515.08
5.4.210.0020.04514.87
5.4.200.0020.03614.82
5.4.190.0070.01914.90
5.4.180.0030.04114.86
5.4.170.0060.03315.01
5.4.160.0020.04314.99
5.4.150.0110.03714.79
5.4.140.0030.03213.70
5.4.130.0020.04013.51
5.4.120.0080.03513.60
5.4.110.0040.04113.70
5.4.100.0070.03513.63
5.4.90.0000.03913.57
5.4.80.0020.03613.53
5.4.70.0060.03613.48
5.4.60.0030.03513.77
5.4.50.0050.03813.63
5.4.40.0050.03313.65
5.4.30.0050.03313.59
5.4.20.0120.03513.53
5.4.10.0090.03613.54
5.4.00.0090.02513.13
5.3.290.0070.03812.65
5.3.280.0070.03712.64
5.3.270.0090.03712.59
5.3.260.0030.03712.59
5.3.250.0070.03412.67
5.3.240.0050.04012.50
5.3.230.0050.03512.55
5.3.220.0110.03012.55
5.3.210.0040.04112.50
5.3.200.0100.03312.55
5.3.190.0110.03512.55
5.3.180.0040.03412.50
5.3.170.0050.03312.63
5.3.160.0050.04012.62
5.3.150.0040.04112.66
5.3.140.0060.04112.64
5.3.130.0030.04312.49
5.3.120.0060.04012.54
5.3.110.0060.03812.58
5.3.100.0050.03912.58
5.3.90.0010.03812.64
5.3.80.0030.03912.52
5.3.70.0000.04012.51
5.3.60.0030.03812.61
5.3.50.0030.04012.49
5.3.40.0050.03912.47
5.3.30.0070.03012.59
5.3.20.0040.03812.62
5.3.10.0050.03712.45
5.3.00.0030.03112.48
5.2.170.0000.03112.08
5.2.160.0050.02712.10
5.2.150.0020.03212.11
5.2.140.0010.03412.09
5.2.130.0010.03412.08
5.2.120.0030.03312.08
5.2.110.0050.03112.12
5.2.100.0020.03212.08
5.2.90.0020.02712.08
5.2.80.0030.03012.08
5.2.70.0030.02312.08
5.2.60.0050.02512.08
5.2.50.0030.03312.08
5.2.40.0080.02012.08
5.2.30.0050.02612.08
5.2.20.0030.03012.08
5.2.10.0050.03012.08
5.2.00.0030.03312.08
5.1.60.0020.02612.08
5.1.50.0030.03112.08
5.1.40.0060.01512.08
5.1.30.0060.01312.08
5.1.20.0030.02212.08
5.1.10.0030.01512.08
5.1.00.0030.01312.08
5.0.50.0000.01312.08
5.0.40.0020.02312.08
5.0.30.0040.01512.08
5.0.20.0020.01212.08
5.0.10.0000.02612.08
5.0.00.0030.01712.08
4.4.90.0060.01312.08
4.4.80.0000.01912.08
4.4.70.0030.02012.08
4.4.60.0000.01912.08
4.4.50.0030.01512.08
4.4.40.0000.02912.08
4.4.30.0020.01312.08
4.4.20.0050.00812.08
4.4.10.0020.01312.08
4.4.00.0010.01312.08
4.3.110.0020.01312.08
4.3.100.0030.00812.08
4.3.90.0020.00712.08
4.3.80.0030.02412.08
4.3.70.0030.01012.08
4.3.60.0020.01112.08
4.3.50.0000.02012.08
4.3.40.0020.02312.08
4.3.30.0030.01712.08
4.3.20.0030.01812.08
4.3.10.0000.01812.08
4.3.00.0000.01412.08

preferences:
49.11 ms | 401 KiB | 5 Q