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.60.0070.00718.43
8.3.50.0110.00521.15
8.3.40.0120.00318.66
8.3.30.0130.00320.17
8.3.20.0080.00020.55
8.3.10.0040.00420.92
8.3.00.0040.00422.48
8.2.180.0120.00917.00
8.2.170.0100.01022.96
8.2.160.0080.00620.56
8.2.150.0080.00024.18
8.2.140.0060.00624.66
8.2.130.0030.00526.16
8.2.120.0050.00221.30
8.2.110.0060.00319.57
8.2.100.0110.00018.09
8.2.90.0050.00219.34
8.2.80.0050.00318.18
8.2.70.0050.00317.88
8.2.60.0040.00418.05
8.2.50.0000.00818.07
8.2.40.0080.00018.41
8.2.30.0040.00419.56
8.2.20.0040.00417.75
8.2.10.0040.00417.98
8.2.00.0000.00917.73
8.1.280.0090.00625.92
8.1.270.0000.00823.99
8.1.260.0080.00026.35
8.1.250.0030.00628.09
8.1.240.0030.00624.15
8.1.230.0080.00420.96
8.1.220.0040.00418.77
8.1.210.0000.00820.77
8.1.200.0030.00617.47
8.1.190.0000.00917.64
8.1.180.0000.00918.10
8.1.170.0030.00618.83
8.1.160.0040.00419.07
8.1.150.0090.00018.76
8.1.140.0040.00417.56
8.1.130.0000.00817.93
8.1.120.0000.00717.53
8.1.110.0020.00517.48
8.1.100.0040.00417.53
8.1.90.0030.00317.62
8.1.80.0040.00417.49
8.1.70.0000.00917.57
8.1.60.0050.00517.64
8.1.50.0040.00417.53
8.1.40.0040.00417.66
8.1.30.0020.00517.77
8.1.20.0060.00317.74
8.1.10.0080.00017.73
8.1.00.0050.00517.71
8.0.300.0030.00620.05
8.0.290.0070.00017.05
8.0.280.0040.00418.47
8.0.270.0000.00717.38
8.0.260.0030.00316.98
8.0.250.0030.00317.16
8.0.240.0000.00817.16
8.0.230.0040.00416.93
8.0.220.0070.00017.05
8.0.210.0050.00317.04
8.0.200.0000.00616.96
8.0.190.0060.00317.00
8.0.180.0040.00417.05
8.0.170.0070.00016.91
8.0.160.0040.00416.88
8.0.150.0000.00716.95
8.0.140.0040.00416.92
8.0.130.0000.00513.53
8.0.120.0000.00817.03
8.0.110.0030.00617.01
8.0.100.0050.00316.80
8.0.90.0040.00416.95
8.0.80.0110.00416.99
8.0.70.0040.00417.08
8.0.60.0000.00716.81
8.0.50.0050.00216.97
8.0.30.0130.00917.04
8.0.20.0140.01017.40
8.0.10.0050.00317.18
8.0.00.0110.00816.87
7.4.330.0060.00016.70
7.4.320.0030.00316.48
7.4.300.0000.00616.54
7.4.290.0030.00316.46
7.4.280.0000.00816.54
7.4.270.0000.00616.54
7.4.260.0000.00613.17
7.4.250.0030.00616.46
7.4.240.0020.00516.55
7.4.230.0070.00016.63
7.4.220.0150.00316.46
7.4.210.0030.01216.40
7.4.200.0040.00416.26
7.4.190.0000.00716.39
7.4.160.0030.01316.48
7.4.150.0040.01517.40
7.4.140.0110.00617.86
7.4.130.0090.00816.64
7.4.120.0080.00816.60
7.4.110.0130.00316.45
7.4.100.0070.01716.50
7.4.90.0120.01216.30
7.4.80.0030.01519.39
7.4.70.0070.01016.59
7.4.60.0160.00516.50
7.4.50.0080.00016.42
7.4.40.0060.00922.77
7.4.30.0060.01516.42
7.4.00.0040.00415.26
7.3.330.0000.00513.12
7.3.320.0000.00513.11
7.3.310.0060.00016.32
7.3.300.0030.00316.28
7.3.290.0100.00316.27
7.3.280.0080.00616.34
7.3.270.0070.01817.40
7.3.260.0150.01318.24
7.3.250.0060.01116.47
7.3.240.0090.00916.35
7.3.230.0090.00916.71
7.3.210.0090.00916.37
7.3.200.0060.01719.39
7.3.190.0090.01016.56
7.3.180.0060.00916.27
7.3.170.0120.01216.27
7.3.160.0150.00316.46
7.3.120.0100.00714.58
7.3.110.0060.00914.88
7.3.100.0070.00715.17
7.3.90.0040.01514.50
7.3.80.0090.00014.62
7.3.70.0040.01214.63
7.3.60.0080.00414.77
7.3.50.0070.00715.04
7.3.40.0060.00615.00
7.3.30.0110.00014.53
7.3.20.0060.00916.84
7.3.10.0100.00417.05
7.3.00.0070.00716.49
7.2.330.0150.00316.57
7.2.320.0110.00616.75
7.2.310.0120.01516.66
7.2.300.0120.00916.85
7.2.290.0040.01316.67
7.2.240.0120.00614.97
7.2.230.0030.01014.99
7.2.220.0130.00715.10
7.2.210.0030.01014.92
7.2.200.0150.00614.96
7.2.190.0000.01415.18
7.2.180.0100.00315.16
7.2.170.0070.01015.14
7.2.160.0160.00015.04
7.2.150.0090.00616.88
7.2.140.0080.00616.53
7.2.130.0100.00316.68
7.2.120.0030.01016.81
7.2.110.0030.00717.00
7.2.100.0030.00616.72
7.2.90.0000.01016.99
7.2.80.0000.01416.71
7.2.70.0080.00417.02
7.2.60.0000.00916.70
7.2.50.0060.00616.97
7.2.40.0000.01117.02
7.2.30.0060.00916.88
7.2.20.0070.00716.79
7.2.10.0000.01516.69
7.2.00.0040.01116.81
7.1.330.0090.00915.88
7.1.320.0080.00415.85
7.1.310.0050.00515.60
7.1.300.0030.00915.84
7.1.290.0120.00015.82
7.1.280.0000.01315.98
7.1.270.0030.00916.02
7.1.260.0100.00315.68
7.1.250.0030.00915.96
7.1.70.0060.00916.95
7.1.60.0100.01419.17
7.1.50.0280.01134.70
7.1.00.0030.05722.36
7.0.200.0000.01017.02
7.0.140.0070.06721.90
7.0.100.0100.03019.93
7.0.90.0100.03019.86
7.0.80.0030.03319.88
7.0.70.0130.05320.04
7.0.60.0030.03319.96
7.0.50.0100.07020.32
7.0.40.0100.05720.13
7.0.30.0030.05020.18
7.0.20.0070.06320.07
7.0.10.0070.04719.95
7.0.00.0100.06720.18
5.6.280.0070.07021.10
5.6.250.0030.03720.77
5.6.240.0000.04320.54
5.6.230.0000.04320.65
5.6.220.0070.07020.64
5.6.210.0130.04020.61
5.6.200.0000.03721.11
5.6.190.0030.08321.10
5.6.180.0070.07321.13
5.6.170.0070.07320.91
5.6.160.0070.08021.04
5.6.150.0070.04021.07
5.6.140.0000.09021.09
5.6.130.0070.07721.00
5.6.120.0130.05321.11
5.6.110.0030.05321.00
5.6.100.0100.08321.00
5.6.90.0100.07321.03
5.6.80.0000.07720.38
5.6.70.0030.06020.32
5.6.60.0070.07720.38
5.6.50.0070.07020.42
5.6.40.0030.06720.46
5.6.30.0030.05320.43
5.6.20.0170.06720.45
5.6.10.0130.06320.48
5.6.00.0070.03720.51
5.5.380.0030.03720.39
5.5.370.0030.03320.41
5.5.360.0000.03720.34
5.5.350.0030.03320.45
5.5.340.0030.04020.63
5.5.330.0000.09320.91
5.5.320.0170.07020.77
5.5.310.0030.07020.63
5.5.300.0030.09020.91
5.5.290.0030.04020.88
5.5.280.0100.03720.74
5.5.270.0030.07720.88
5.5.260.0230.07020.86
5.5.250.0070.03720.64
5.5.240.0100.05720.20
5.5.230.0070.05020.01
5.5.220.0070.03320.01
5.5.210.0000.04020.17
5.5.200.0070.04720.10
5.5.190.0030.06020.20
5.5.180.0070.07320.10
5.5.160.0030.06320.07
5.5.150.0130.08020.26
5.5.140.0030.03720.13
5.5.130.0100.07320.21
5.5.120.0070.03720.22
5.5.110.0030.06020.16
5.5.100.0070.04320.07
5.5.90.0130.03320.00
5.5.80.0100.06320.14
5.5.70.0070.03319.93
5.5.60.0100.07020.05
5.5.50.0270.05720.13
5.5.40.0030.08320.03
5.5.30.0070.03720.01
5.5.20.0170.06320.00
5.5.10.0070.07020.01
5.5.00.0170.02719.96
5.4.450.0070.08019.45
5.4.440.0070.03719.27
5.4.430.0100.06719.45
5.4.420.0030.08319.44
5.4.410.0130.07018.98
5.4.400.0000.06019.03
5.4.390.0070.03719.03
5.4.380.0030.07718.79
5.4.370.0030.08018.79
5.4.360.0130.07019.06
5.4.350.0100.07019.13
5.4.340.0000.05319.04
5.4.320.0130.06719.14
5.4.310.0100.07018.98
5.4.300.0070.03019.12
5.4.290.0070.03719.12
5.4.280.0070.03018.94
5.4.270.0100.04319.02
5.4.260.0100.06018.98
5.4.250.0130.06319.11
5.4.240.0100.03019.09
5.4.230.0030.03719.11
5.4.220.0070.03319.22
5.4.210.0130.04718.80
5.4.200.0030.05719.02
5.4.190.0030.03719.23
5.4.180.0070.05718.77
5.4.170.0070.05319.02
5.4.160.0170.04719.09
5.4.150.0100.05719.01
5.4.140.0130.03016.38
5.4.130.0030.07016.35
5.4.120.0170.04316.36
5.4.110.0030.08316.32
5.4.100.0030.07716.22
5.4.90.0170.07316.26
5.4.80.0070.04716.20
5.4.70.0070.07016.25
5.4.60.0030.03716.28
5.4.50.0100.03716.38
5.4.40.0070.06016.34
5.4.30.0030.03716.37
5.4.20.0030.03316.31
5.4.10.0000.05716.17
5.4.00.0100.06715.73
5.3.290.0100.07314.61
5.3.280.0130.06714.54
5.3.270.0070.04714.52
5.3.260.0000.04714.60
5.3.250.0030.08014.55
5.3.240.0070.07014.45
5.3.230.0100.04714.45
5.3.220.0130.05014.40
5.3.210.0000.03714.56
5.3.200.0030.03714.39
5.3.190.0070.07014.54
5.3.180.0030.07014.54
5.3.170.0070.07314.41
5.3.160.0030.03714.40
5.3.150.0070.07714.55
5.3.140.0100.07014.49
5.3.130.0030.06314.55
5.3.120.0070.07314.50
5.3.110.0070.07314.40
5.3.100.0030.07314.02
5.3.90.0070.04713.99
5.3.80.0000.04013.99
5.3.70.0000.05314.01
5.3.60.0100.04714.01
5.3.50.0030.03713.80
5.3.40.0070.04713.71
5.3.30.0030.05313.87
5.3.20.0070.06013.70
5.3.10.0070.04713.61
5.3.00.0000.04313.60
5.2.170.0000.02711.16
5.2.160.0030.03310.96
5.2.150.0000.03311.00
5.2.140.0070.02711.16
5.2.130.0030.06010.93
5.2.120.0030.06011.09
5.2.110.0100.02011.05
5.2.100.0000.03010.91
5.2.90.0030.02311.02
5.2.80.0070.02711.09
5.2.70.0030.05311.04
5.2.60.0000.06011.11
5.2.50.0100.05010.80
5.2.40.0030.06011.03
5.2.30.0100.02010.96
5.2.20.0070.06011.03
5.2.10.0030.03710.78
5.2.00.0000.03010.73
5.1.60.0030.02310.00
5.1.50.0130.0479.82
5.1.40.0000.0279.98
5.1.30.0000.05310.36
5.1.20.0030.03710.40
5.1.10.0030.03710.11
5.1.00.0030.05710.14
5.0.50.0000.0208.43
5.0.40.0000.0278.41
5.0.30.0030.0538.27
5.0.20.0100.0238.28
5.0.10.0000.0278.15
5.0.00.0030.0608.25
4.4.90.0000.0378.11
4.4.80.0000.0278.11
4.4.70.0000.0178.11
4.4.60.0030.0238.11
4.4.50.0030.0178.11
4.4.40.0030.0478.11
4.4.30.0100.0078.11
4.4.20.0000.0138.11
4.4.10.0030.0278.11
4.4.00.0000.0278.11
4.3.110.0000.0378.11
4.3.100.0070.0278.11
4.3.90.0030.0178.11
4.3.80.0030.0238.11
4.3.70.0000.0338.11
4.3.60.0000.0208.11
4.3.50.0030.0238.11
4.3.40.0000.0438.11
4.3.30.0000.0178.11
4.3.20.0000.0408.11
4.3.10.0000.0178.11
4.3.00.0000.0278.11

preferences:
43.19 ms | 401 KiB | 5 Q