3v4l.org

run code in 300+ PHP versions simultaneously
<?php $result = "°Freen\x18 ew°\x90ɮ\x7F\xc2"; $result = preg_replace('~[\x{0000}-\x{000F}\x{007F}-\x{00a0}]~S', '', $result); //$result = preg_replace('~[\x{0000}-\x{00F}]~', '', $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.40.0070.00718.83
8.3.30.0040.01118.92
8.3.20.0060.00318.81
8.3.10.0000.00820.57
8.3.00.0040.00419.38
8.2.170.0100.01022.96
8.2.160.0100.00322.33
8.2.150.0080.00024.18
8.2.140.0030.00624.66
8.2.130.0000.00726.16
8.2.120.0060.00319.95
8.2.110.0070.00420.82
8.2.100.0040.00817.84
8.2.90.0000.00819.22
8.2.80.0040.00418.04
8.2.70.0000.00817.75
8.2.60.0050.00317.80
8.2.50.0040.00418.07
8.2.40.0050.00318.22
8.2.30.0080.00019.94
8.2.20.0000.00917.80
8.2.10.0070.00017.94
8.2.00.0000.00817.82
8.1.270.0050.00323.99
8.1.260.0040.00426.35
8.1.250.0090.00628.09
8.1.240.0060.00620.76
8.1.230.0110.00021.03
8.1.220.0050.00318.77
8.1.210.0040.00418.84
8.1.200.0060.00317.38
8.1.190.0030.00517.39
8.1.180.0060.00318.10
8.1.170.0000.00718.73
8.1.160.0000.00818.85
8.1.150.0080.00018.73
8.1.140.0040.00417.53
8.1.130.0030.00517.82
8.1.120.0080.00017.49
8.1.110.0000.00717.42
8.1.100.0040.00417.40
8.1.90.0070.00017.45
8.1.80.0030.00317.44
8.1.70.0000.00717.40
8.1.60.0050.00317.67
8.1.50.0070.00017.61
8.1.40.0040.00417.63
8.1.30.0000.00817.70
8.1.20.0040.00417.79
8.1.10.0040.00417.61
8.1.00.0080.00017.61
8.0.300.0070.00320.03
8.0.290.0000.00716.88
8.0.280.0030.00318.48
8.0.270.0000.00717.23
8.0.260.0030.00316.96
8.0.250.0040.00417.13
8.0.240.0040.00417.09
8.0.230.0000.00717.03
8.0.220.0000.00717.02
8.0.210.0030.00416.96
8.0.200.0000.00717.04
8.0.190.0030.00517.04
8.0.180.0030.00616.90
8.0.170.0060.00316.88
8.0.160.0030.00616.98
8.0.150.0040.00416.86
8.0.140.0090.00316.82
8.0.130.0050.00013.40
8.0.120.0040.00416.94
8.0.110.0070.00016.76
8.0.100.0050.00216.98
8.0.90.0070.00016.80
8.0.80.0040.01116.96
8.0.70.0040.00416.85
8.0.60.0040.00416.84
8.0.50.0070.00017.04
8.0.30.0120.01217.07
8.0.20.0110.00917.40
8.0.10.0080.00017.13
8.0.00.0090.00816.95
7.4.330.0000.00514.92
7.4.320.0030.00316.66
7.4.300.0030.00316.68
7.4.290.0000.00616.77
7.4.280.0040.00416.75
7.4.270.0000.00716.67
7.4.260.0050.00013.44
7.4.250.0060.00316.50
7.4.240.0030.00316.75
7.4.230.0050.00216.86
7.4.220.0110.00716.70
7.4.210.0070.00916.77
7.4.200.0080.00016.47
7.4.190.0080.00016.88
7.4.160.0080.00816.71
7.4.150.0090.00917.40
7.4.140.0120.00617.15
7.4.130.0130.00516.74
7.4.120.0090.00916.69
7.4.110.0070.01016.50
7.4.100.0100.00716.46
7.4.90.0110.00716.66
7.4.80.0100.00719.03
7.4.70.0130.00316.58
7.4.60.0030.01316.55
7.4.50.0030.00616.61
7.4.40.0080.00522.27
7.4.30.0150.00916.62
7.4.10.0100.00715.11
7.4.00.0130.00515.06
7.3.330.0000.00513.23
7.3.320.0030.00313.14
7.3.310.0000.00616.21
7.3.300.0070.00016.35
7.3.290.0060.01316.25
7.3.280.0100.00816.36
7.3.270.0160.00617.40
7.3.260.0090.00918.24
7.3.250.0110.01216.49
7.3.240.0060.01116.46
7.3.230.0070.01016.39
7.3.210.0110.00616.61
7.3.200.0060.01219.39
7.3.190.0100.00716.46
7.3.180.0060.01016.54
7.3.170.0100.00716.74
7.3.160.0140.00716.30
7.3.130.0130.00615.01
7.3.120.0060.01015.08
7.3.110.0060.00914.55
7.3.100.0080.00414.85
7.3.90.0070.00815.00
7.3.80.0070.00415.02
7.3.70.0000.01414.92
7.3.60.0090.00614.70
7.3.50.0090.00314.83
7.3.40.0090.00614.87
7.3.30.0040.00414.66
7.3.20.0070.00416.68
7.3.10.0060.01016.73
7.3.00.0060.00916.86
7.2.330.0160.00716.83
7.2.320.0070.01716.64
7.2.310.0070.01616.66
7.2.300.0070.01016.83
7.2.290.0130.00316.56
7.2.260.0090.00914.86
7.2.250.0000.01414.93
7.2.240.0030.01014.93
7.2.230.0030.00915.17
7.2.220.0100.01015.12
7.2.210.0030.00814.93
7.2.200.0060.00915.11
7.2.190.0060.00615.03
7.2.180.0060.00615.20
7.2.170.0100.00315.02
7.2.160.0060.00315.23
7.2.150.0080.00617.10
7.2.140.0030.00916.68
7.2.130.0120.00316.71
7.2.120.0090.00316.70
7.2.110.0090.00617.10
7.2.100.0030.00716.86
7.2.90.0110.00417.00
7.2.80.0090.00616.66
7.2.70.0060.00617.01
7.2.60.0060.00916.99
7.2.50.0030.01117.07
7.2.40.0030.01016.75
7.2.30.0040.01117.14
7.2.20.0060.00316.74
7.2.10.0000.01216.82
7.2.00.0070.01118.16
7.1.330.0030.00915.98
7.1.320.0120.00615.79
7.1.310.0000.01516.16
7.1.300.0040.01115.87
7.1.290.0030.00915.84
7.1.280.0100.00315.67
7.1.270.0060.00615.93
7.1.260.0060.00615.55
7.1.250.0080.00415.59
7.1.240.0000.01515.95
7.1.230.0000.01315.95
7.1.220.0030.00716.00
7.1.210.0060.01215.98
7.1.200.0060.00815.85
7.1.190.0060.00615.81
7.1.180.0030.00715.79
7.1.170.0100.00015.70
7.1.160.0030.00616.05
7.1.150.0040.00815.66
7.1.140.0030.01016.02
7.1.130.0000.00915.89
7.1.120.0040.01215.68
7.1.110.0040.01115.98
7.1.100.0040.01016.88
7.1.90.0060.00915.79
7.1.80.0000.01515.87
7.1.70.0030.00716.52
7.1.60.0070.01317.65
7.1.50.0030.01016.30
7.1.40.0080.00015.99
7.1.30.0060.00615.58
7.1.20.0060.00915.92
7.1.10.0040.01116.07
7.1.00.0030.03519.22
7.0.330.0000.01015.27
7.0.320.0070.00715.55
7.0.310.0000.01215.22
7.0.300.0040.00415.55
7.0.290.0090.00315.68
7.0.280.0000.01315.51
7.0.270.0040.00415.58
7.0.260.0100.00715.63
7.0.250.0090.00315.59
7.0.240.0090.00915.38
7.0.230.0070.00415.59
7.0.220.0000.01415.74
7.0.210.0060.00615.44
7.0.200.0070.00715.96
7.0.190.0030.00615.46
7.0.180.0000.01415.68
7.0.170.0030.00815.49
7.0.160.0050.00515.52
7.0.150.0000.01415.62
7.0.140.0050.04018.92
7.0.130.0030.01115.57
7.0.120.0090.00615.52
7.0.110.0030.00915.38
7.0.100.0080.00315.58
7.0.90.0090.00315.75
7.0.80.0040.01115.23
7.0.70.0060.00915.63
7.0.60.0080.03417.83
7.0.50.0110.04016.78
7.0.40.0050.05016.88
7.0.30.0050.04116.73
7.0.20.0050.03016.83
7.0.10.0110.04217.04
7.0.00.0080.04416.69
5.6.400.0040.00414.18
5.6.390.0030.00914.37
5.6.380.0000.01314.68
5.6.370.0000.01414.09
5.6.360.0030.01014.60
5.6.350.0080.00414.07
5.6.340.0070.00714.26
5.6.330.0070.01014.27
5.6.320.0030.01214.38
5.6.310.0070.01013.91
5.6.300.0080.00614.61
5.6.290.0100.00314.09
5.6.280.0070.03717.74
5.6.270.0060.00914.38
5.6.260.0000.01114.21
5.6.250.0120.00314.29
5.6.240.0040.00714.28
5.6.230.0120.00414.01
5.6.220.0080.01114.40
5.6.210.0050.03517.43
5.6.200.0050.04516.19
5.6.190.0080.02817.36
5.6.180.0070.03017.43
5.6.170.0100.03217.44
5.6.160.0060.02517.37
5.6.150.0030.03417.37
5.6.140.0040.02917.19
5.6.130.0030.02917.21
5.6.120.0050.02717.24
5.6.110.0050.04617.24
5.6.100.0050.02517.26
5.6.90.0050.02517.22
5.6.80.0030.02616.87
5.6.70.0030.02516.98
5.6.60.0050.02817.08
5.6.50.0050.02317.02
5.6.40.0080.02216.86
5.6.30.0040.02216.97
5.6.20.0050.02216.83
5.6.10.0040.02316.85
5.6.00.0070.02216.99
5.5.380.0040.01114.09
5.5.370.0110.00314.37
5.5.360.0160.00014.06
5.5.350.2100.02317.26
5.5.340.0020.03016.05
5.5.330.0050.04417.09
5.5.320.0100.04217.08
5.5.310.0080.04317.25
5.5.300.0080.03717.14
5.5.290.0020.02717.22
5.5.280.0020.03517.02
5.5.270.0070.04516.87
5.5.260.0120.01717.06
5.5.250.0040.02216.98
5.5.240.0030.02516.53
5.5.230.0020.03016.86
5.5.220.0020.02716.73
5.5.210.0090.01816.69
5.5.200.0020.02616.64
5.5.190.0050.02516.73
5.5.180.0010.02616.63
5.5.170.0000.01613.96
5.5.160.0040.02416.71
5.5.150.0070.02516.56
5.5.140.0070.03216.80
5.5.130.0080.01816.73
5.5.120.0020.02716.69
5.5.110.0070.02016.86
5.5.100.0030.02416.85
5.5.90.0070.02016.79
5.5.80.0090.02516.71
5.5.70.0070.02016.67
5.5.60.0100.01716.72
5.5.50.0020.02316.61
5.5.40.0030.02616.73
5.5.30.0050.03316.58
5.5.20.0050.04316.80
5.5.10.0080.04116.65
5.5.00.0070.03016.68
5.4.450.0000.02815.09
5.4.440.0030.04115.20
5.4.430.0120.02514.94
5.4.420.0060.02115.01
5.4.410.0090.01715.16
5.4.400.0050.02014.90
5.4.390.0040.02214.92
5.4.380.0070.01814.94
5.4.370.0050.02514.97
5.4.360.0000.02615.09
5.4.350.0080.01815.06
5.4.340.0090.01715.12
5.4.330.0060.00310.88
5.4.320.0030.02314.86
5.4.310.0030.02514.93
5.4.300.0050.02014.98
5.4.290.0050.02214.84
5.4.280.0020.02215.02
5.4.270.0020.02414.96
5.4.260.0030.02015.03
5.4.250.0000.02514.93
5.4.240.0030.02014.83
5.4.230.0050.01814.85
5.4.220.0100.02015.13
5.4.210.0070.01815.09
5.4.200.0030.04214.98
5.4.190.0000.03714.99
5.4.180.0050.03814.95
5.4.170.0100.03815.11
5.4.160.0080.03715.01
5.4.150.0060.02414.97
5.4.140.0080.03813.56
5.4.130.0030.03813.64
5.4.120.0060.02313.63
5.4.110.0020.03013.55
5.4.100.0050.03413.67
5.4.90.0040.03313.73
5.4.80.0050.02313.65
5.4.70.0050.02313.78
5.4.60.0050.02513.69
5.4.50.0030.02913.55
5.4.40.0090.03313.66
5.4.30.0080.02313.65
5.4.20.0050.03713.74
5.4.10.0030.04313.47
5.4.00.0070.03513.39
5.3.290.0040.02212.56
5.3.280.0050.02112.52
5.3.270.0050.03812.45
5.3.260.0110.03612.50
5.3.250.0030.03812.53
5.3.240.0020.02912.47
5.3.230.0040.02612.39
5.3.220.0080.02212.44
5.3.210.0100.03912.42
5.3.200.0050.04312.42
5.3.190.0040.02712.44
5.3.180.0010.03512.44
5.3.170.0050.03312.51
5.3.160.0020.04212.43
5.3.150.0050.03712.46
5.3.140.0070.03712.47
5.3.130.0020.02812.46
5.3.120.0070.03712.38
5.3.110.0050.03112.36
5.3.100.0060.02212.27
5.3.90.0020.02312.08
5.3.80.0060.02312.13
5.3.70.0030.03812.03
5.3.60.0050.04012.12
5.3.50.0020.04512.07
5.3.40.0110.03611.99
5.3.30.0030.04011.97
5.3.20.0090.02712.08
5.3.10.0060.02511.88
5.3.00.0080.03311.86
5.2.170.0030.06711.03
5.2.160.0000.03711.09
5.2.150.0100.05711.15
5.2.140.0030.06711.07
5.2.130.0170.05011.08
5.2.120.0070.03711.00
5.2.110.0000.03311.09
5.2.100.0030.04711.08
5.2.90.0070.03011.10
5.2.80.0130.06311.05
5.2.70.0030.06710.99
5.2.60.0070.05011.20
5.2.50.0000.05710.91
5.2.40.0070.06010.93
5.2.30.0070.05710.90
5.2.20.0070.04310.85
5.2.10.0030.03010.71
5.2.00.0000.03710.73
5.1.60.0000.0609.83
5.1.50.0070.05010.14
5.1.40.0030.0279.95
5.1.30.0070.06010.34
5.1.20.0030.03710.34
5.1.10.0030.05310.10
5.1.00.0000.04010.06
5.0.50.0030.0378.50
5.0.40.0030.0378.37
5.0.30.0000.0738.21
5.0.20.0070.0438.25
5.0.10.0100.0408.18
5.0.00.0100.0508.07
4.4.90.0030.0276.66
4.4.80.0030.0336.66
4.4.70.0000.0406.66
4.4.60.0030.0176.66
4.4.50.0070.0236.66
4.4.40.0030.0306.66
4.4.30.0000.0206.66
4.4.20.0030.0376.66
4.4.10.0130.0276.66
4.4.00.0000.0336.66
4.3.110.0070.0336.66
4.3.100.0000.0406.66
4.3.90.0030.0306.66
4.3.80.0070.0436.66
4.3.70.0000.0236.66
4.3.60.0070.0306.66
4.3.50.0030.0376.66
4.3.40.0100.0476.66
4.3.30.0000.0236.66
4.3.20.0030.0336.66
4.3.10.0030.0376.66
4.3.00.0000.0376.66

preferences:
48.18 ms | 400 KiB | 5 Q