3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* Detect character encoding with current detect_order */ echo mb_detect_encoding($str); /* "auto" is expanded according to mbstring.language */ echo mb_detect_encoding($str, "auto"); /* Specify encoding_list character encoding by comma separated list */ echo mb_detect_encoding($str, "JIS, eucjp-win, sjis-win"); /* Use array to specify encoding_list */ $ary[] = "ASCII"; $ary[] = "JIS"; $ary[] = "EUC-JP"; echo mb_detect_encoding($str, $ary);

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.0100.01018.89
8.3.30.0070.00718.89
8.3.20.0080.00018.90
8.3.10.0040.00420.75
8.3.00.0000.00823.65
8.2.170.0040.01122.96
8.2.160.0100.00320.47
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0080.00019.61
8.2.110.0030.00720.79
8.2.100.0070.00418.03
8.2.90.0080.00019.34
8.2.80.0000.00818.18
8.2.70.0080.00017.75
8.2.60.0040.00418.18
8.2.50.0040.00418.07
8.2.40.0000.00918.34
8.2.30.0040.00420.07
8.2.20.0040.00417.81
8.2.10.0000.00717.85
8.2.00.0030.00717.75
8.1.270.0030.00623.99
8.1.260.0030.00526.35
8.1.250.0000.00728.09
8.1.240.0100.00022.53
8.1.230.0080.00320.98
8.1.220.0000.00818.77
8.1.210.0000.00918.96
8.1.200.0060.00317.38
8.1.190.0060.00317.65
8.1.180.0060.00318.10
8.1.170.0080.00018.82
8.1.160.0060.00318.97
8.1.150.0040.00418.68
8.1.140.0050.00217.59
8.1.130.0000.00717.94
8.1.120.0000.00817.49
8.1.110.0000.00817.54
8.1.100.0030.00617.53
8.1.90.0040.00417.58
8.1.80.0050.00317.55
8.1.70.0070.00017.52
8.1.60.0000.00817.69
8.1.50.0040.00417.50
8.1.40.0040.00417.66
8.1.30.0040.00417.66
8.1.20.0000.00817.83
8.1.10.0090.00017.56
8.1.00.0070.00317.76
8.0.300.0000.00820.14
8.0.290.0040.00417.43
8.0.280.0050.00218.47
8.0.270.0030.00317.36
8.0.260.0060.00017.01
8.0.250.0080.00017.01
8.0.240.0040.00417.02
8.0.230.0000.00717.01
8.0.220.0000.00717.07
8.0.210.0030.00516.97
8.0.200.0040.00417.14
8.0.190.0030.00617.12
8.0.180.0030.00517.04
8.0.170.0040.00417.07
8.0.160.0040.00417.09
8.0.150.0000.00716.99
8.0.140.0030.00616.86
8.0.130.0030.00313.50
8.0.120.0000.00816.95
8.0.110.0030.00517.03
8.0.100.0040.00416.91
8.0.90.0040.00417.04
8.0.80.0090.00616.89
8.0.70.0050.00316.86
8.0.60.0040.00416.81
8.0.50.0000.00717.05
8.0.30.0140.00617.23
8.0.20.0140.00717.40
8.0.10.0040.00417.13
8.0.00.0160.00516.68
7.4.330.0050.00014.63
7.4.320.0030.00616.45
7.4.300.0060.00016.32
7.4.290.0000.00716.43
7.4.280.0040.00416.50
7.4.270.0000.00616.59
7.4.260.0030.00313.23
7.4.250.0030.00516.50
7.4.240.0000.00816.54
7.4.230.0000.00716.52
7.4.220.0100.01416.48
7.4.210.0060.01016.49
7.4.200.0000.00716.46
7.4.190.0060.00316.55
7.4.160.0120.00416.46
7.4.150.0130.00517.40
7.4.140.0120.00517.86
7.4.130.0070.01016.53
7.4.120.0070.01316.42
7.4.110.0090.00916.71
7.4.100.0080.00816.57
7.4.90.0110.00816.42
7.4.80.0040.01319.37
7.4.70.0070.01616.56
7.4.60.0090.00916.39
7.4.50.0030.00516.30
7.4.40.0090.00622.27
7.4.30.0160.00816.62
7.4.10.0040.01415.09
7.4.00.0100.00714.91
7.3.330.0000.00513.13
7.3.320.0050.00013.17
7.3.310.0040.00316.18
7.3.300.0040.00416.23
7.3.290.0060.00916.43
7.3.280.0140.00316.32
7.3.270.0140.00317.40
7.3.260.0120.00918.24
7.3.250.0130.00816.35
7.3.240.0100.01016.34
7.3.230.0130.00316.39
7.3.210.0030.01716.48
7.3.200.0030.01219.39
7.3.190.0100.01316.65
7.3.180.0140.00316.37
7.3.170.0100.00716.60
7.3.160.0080.00816.43
7.3.130.0090.00614.69
7.3.120.0020.01514.85
7.3.110.0080.00814.63
7.3.100.0100.00514.90
7.3.90.0010.01015.09
7.3.80.0070.00714.84
7.3.70.0050.00614.80
7.3.60.0110.00414.87
7.3.50.0040.00914.75
7.3.40.0050.00614.72
7.3.30.0030.01214.85
7.3.20.0100.00316.78
7.3.10.0040.01216.77
7.3.00.0060.00616.50
7.2.330.0100.01016.64
7.2.320.0060.01016.56
7.2.310.0150.00816.67
7.2.300.0080.00816.54
7.2.290.0060.01316.85
7.2.260.0120.00915.13
7.2.250.0050.01214.96
7.2.240.0040.01014.86
7.2.230.0050.00914.95
7.2.220.0060.00814.97
7.2.210.0050.01114.96
7.2.200.0040.01315.05
7.2.190.0110.00515.13
7.2.180.0070.01015.04
7.2.170.0020.01014.86
7.2.160.0060.00814.97
7.2.150.0040.00816.77
7.2.140.0000.01017.20
7.2.130.0060.01016.77
7.2.120.0040.00816.83
7.2.110.0060.00916.97
7.2.100.0040.01116.67
7.2.90.0090.00617.02
7.2.80.0000.01516.52
7.2.70.0040.01116.89
7.2.60.0100.00016.99
7.2.50.0000.00916.86
7.2.40.0030.01216.78
7.2.30.0000.01116.75
7.2.20.0030.01316.79
7.2.10.0060.00616.84
7.2.00.0050.00718.08
7.1.330.0040.00915.92
7.1.320.0110.00515.78
7.1.310.0050.00915.79
7.1.300.0060.00815.83
7.1.290.0030.00815.87
7.1.280.0060.00615.77
7.1.270.0060.00815.54
7.1.260.0070.00515.90
7.1.250.0110.00315.68
7.1.240.0030.00615.79
7.1.230.0090.00315.67
7.1.220.0060.00315.84
7.1.210.0030.01015.83
7.1.200.0090.00615.74
7.1.190.0040.01115.71
7.1.180.0080.00015.69
7.1.170.0090.00616.03
7.1.160.0060.00615.45
7.1.150.0030.01015.76
7.1.140.0070.00715.75
7.1.130.0040.00915.89
7.1.120.0040.01115.88
7.1.110.0000.01515.82
7.1.100.0060.00916.96
7.1.90.0060.00616.01
7.1.80.0000.00815.91
7.1.70.0030.00616.45
7.1.60.0060.00917.54
7.1.50.0080.00916.44
7.1.40.0080.00015.91
7.1.30.0040.00715.78
7.1.20.0030.01015.71
7.1.10.0000.01115.97
7.1.00.0030.04219.01
7.0.330.0130.00315.47
7.0.320.0030.00715.68
7.0.310.0070.00315.48
7.0.300.0000.01015.51
7.0.290.0100.00315.42
7.0.280.0100.00615.49
7.0.270.0040.01115.19
7.0.260.0030.00915.63
7.0.250.0060.01215.70
7.0.240.0000.01415.63
7.0.230.0060.00615.78
7.0.220.0030.01015.72
7.0.210.0130.00015.37
7.0.200.0030.00816.16
7.0.190.0060.00915.30
7.0.180.0060.00915.55
7.0.170.0000.01215.21
7.0.160.0030.00615.66
7.0.150.0060.00315.48
7.0.140.0050.03818.72
7.0.130.0060.00315.34
7.0.120.0040.00715.39
7.0.110.0070.01015.32
7.0.100.0070.01015.60
7.0.90.0080.00515.62
7.0.80.0060.00615.45
7.0.70.0030.01015.61
7.0.60.0100.02017.78
7.0.50.0060.04716.68
7.0.40.0020.02716.71
7.0.30.0120.03216.83
7.0.20.0070.03016.92
7.0.10.0060.04216.80
7.0.00.0020.04416.93
5.6.400.0040.00714.61
5.6.390.0040.01214.13
5.6.380.0040.00414.55
5.6.370.0090.00614.63
5.6.360.0000.01314.22
5.6.350.0030.00714.61
5.6.340.0080.00814.20
5.6.330.0030.01014.31
5.6.320.0040.00814.17
5.6.310.0040.01114.31
5.6.300.0090.00614.73
5.6.290.0000.01114.38
5.6.280.0020.04217.53
5.6.270.0090.00614.30
5.6.260.0090.00614.02
5.6.250.0070.00714.36
5.6.240.0040.01414.21
5.6.230.0070.01014.36
5.6.220.0000.01014.41
5.6.210.0100.03417.41
5.6.200.0030.04516.10
5.6.190.0030.04517.56
5.6.180.0190.03117.33
5.6.170.0130.02817.58
5.6.160.0050.04717.47
5.6.150.0070.04316.29
5.6.140.0050.04716.27
5.6.130.0070.04416.26
5.6.120.0100.04417.76
5.6.110.0070.04317.64
5.6.100.0100.04217.58
5.6.90.0030.04917.58
5.6.80.0060.02817.31
5.6.70.0030.00614.46
5.6.60.0020.01314.25
5.6.50.0070.00714.55
5.6.40.0040.00814.17
5.6.30.0070.00714.32
5.6.20.0070.00714.21
5.6.10.0080.00414.35
5.6.00.0100.00314.11
5.5.380.0110.00414.40
5.5.370.0000.01014.26
5.5.360.0060.00614.20
5.5.350.0130.02617.43
5.5.340.0020.04315.97
5.5.330.0100.02117.17
5.5.320.0220.02217.47
5.5.310.0200.03017.25
5.5.300.0070.03016.11
5.5.290.0050.04416.15
5.5.280.0030.02717.53
5.5.270.0060.04517.49
5.5.260.0100.04517.50
5.5.250.0150.03817.47
5.5.240.0020.03217.10
5.5.230.0000.01614.30
5.5.220.0060.00614.07
5.5.210.0030.01314.19
5.5.200.0080.00414.15
5.5.190.0060.00914.37
5.5.180.0080.00313.91
5.5.170.0090.00314.08
5.5.160.0000.01114.20
5.5.150.0090.00613.83
5.5.140.0040.00814.21
5.5.130.0090.00614.28
5.5.120.0070.00414.15
5.5.110.0110.00314.34
5.5.100.0070.00714.11
5.5.90.0110.00014.16
5.5.80.0080.00614.03
5.5.70.0030.01214.12
5.5.60.0100.00714.05
5.5.50.0100.00014.36
5.5.40.0030.01013.99
5.5.30.0110.00514.34
5.5.20.0040.01214.32
5.5.10.0070.00714.21
5.5.00.0060.00614.07
5.4.450.0150.02315.28
5.4.440.0140.02715.05
5.4.430.0180.04015.04
5.4.420.0210.02715.09
5.4.410.0230.03415.22
5.4.400.0180.03814.96
5.4.390.0150.04315.09
5.4.380.0210.02314.91
5.4.370.0170.02214.99
5.4.360.0150.02315.04
5.4.350.0110.02814.83
5.4.340.0130.03015.01
5.4.330.0060.00611.09
5.4.320.0170.02915.07
5.4.310.0150.03815.03
5.4.300.0170.02714.95
5.4.290.0170.03814.91
5.4.280.0230.03414.85
5.4.270.0150.02215.09
5.4.260.0170.03314.91
5.4.250.0190.03914.89
5.4.240.0180.03914.93
5.4.230.0160.04114.80
5.4.220.0150.02315.04
5.4.210.0150.03514.96
5.4.200.0160.02414.80
5.4.190.0160.03614.99
5.4.180.0180.02815.01
5.4.170.0210.01615.00
5.4.160.0140.02415.06
5.4.150.0190.03214.80
5.4.140.0190.02413.49
5.4.130.0180.03613.63
5.4.120.0170.03213.59
5.4.110.0150.02913.60
5.4.100.0230.02613.52
5.4.90.0200.03713.60
5.4.80.0220.02413.55
5.4.70.0190.03613.60
5.4.60.0200.03613.53
5.4.50.0150.02313.59
5.4.40.0180.03513.67
5.4.30.0190.03713.68
5.4.20.0150.04013.61
5.4.10.0210.03413.69
5.4.00.0170.03513.44
5.3.290.0120.02512.71
5.3.280.0180.03212.63
5.3.270.0200.02412.65
5.3.260.0150.03812.69
5.3.250.0230.03512.76
5.3.240.0170.03712.63
5.3.230.0160.02412.65
5.3.220.0150.02612.66
5.3.210.0170.03812.67
5.3.200.0150.03912.61
5.3.190.0160.04112.66
5.3.180.0120.02812.67
5.3.170.0180.03312.63
5.3.160.0170.04012.71
5.3.150.0170.02612.66
5.3.140.0180.03712.66
5.3.130.0150.02912.59
5.3.120.0200.03512.70
5.3.110.0190.03212.65
5.3.100.0180.01812.40
5.3.90.0160.02512.44
5.3.80.0170.03812.34
5.3.70.0250.02712.33
5.3.60.0120.02812.33
5.3.50.0170.02012.42
5.3.40.0150.03912.30
5.3.30.0190.02812.30
5.3.20.0200.02212.17
5.3.10.0210.03112.19
5.3.00.0250.02512.15
5.2.170.0270.06012.13
5.2.160.0230.03312.13
5.2.150.0200.03312.13
5.2.140.0300.03712.13
5.2.130.0330.05312.13
5.2.120.0270.04712.13
5.2.110.0270.05012.13
5.2.100.0300.04312.13
5.2.90.0230.05712.13
5.2.80.0270.05312.13
5.2.70.0270.04012.13
5.2.60.0230.04712.13
5.2.50.0230.05312.13
5.2.40.0170.06312.13
5.2.30.0130.04712.13
5.2.20.0170.05012.13
5.2.10.0200.05712.13
5.2.00.0270.05012.13
5.1.60.0170.04712.13
5.1.50.0200.05012.13
5.1.40.0230.04712.13
5.1.30.0270.03312.13
5.1.20.0170.03012.13
5.1.10.0270.04712.13
5.1.00.0200.05012.13
5.0.50.0130.04312.13
5.0.40.0200.03712.13
5.0.30.0130.06312.13
5.0.20.0070.03712.13
5.0.10.0100.02712.13
5.0.00.0230.03012.13
4.4.90.0030.02712.13
4.4.80.0130.03012.13
4.4.70.0070.01712.13
4.4.60.0100.01312.13
4.4.50.0100.03712.13
4.4.40.0100.03712.13
4.4.30.0100.03312.13
4.4.20.0070.02012.13
4.4.10.0100.03712.13
4.4.00.0200.04012.13
4.3.110.0100.03312.13
4.3.100.0170.02712.13
4.3.90.0170.01312.13
4.3.80.0100.04312.13
4.3.70.0100.01712.13
4.3.60.0000.01712.13
4.3.50.0070.02012.13
4.3.40.0100.02712.13
4.3.30.0000.01712.13
4.3.20.0000.01712.13
4.3.10.0030.01312.13
4.3.00.0000.01712.13

preferences:
42.9 ms | 400 KiB | 5 Q