3v4l.org

run code in 300+ PHP versions simultaneously
<?php $some_string = "Ку ку"; $arra_c = array( "UTF-8", "ASCII", "ISO-8859-1", "ISO-8859-2", "ISO-8859-3", "ISO-8859-4", "ISO-8859-6", "ISO-8859-7", "ISO-8859-8", "ISO-8859-9", "ISO-8859-10", "ISO-8859-13", "ISO-8859-14", "ISO-8859-15", "EUC-TW", "CP950", "BIG-5", "Windows-1252",// (CP1252) ); foreach($arra_c as $k => $v){ var_dump(mb_convert_encoding($some_string,$v,"UTF-8" ). "-" . $v ." # ". strlen(json_encode(array('message' => mb_convert_encoding($some_string,$v,"UTF-8" ))))); } //var_dump(mb_detect_encoding($some_string)); //var_dump(strlen(json_encode(array('message' => $some_string))));

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.0150.00618.97
8.3.30.0070.00720.34
8.3.20.0040.01120.41
8.3.10.0040.00422.09
8.3.00.0040.00422.39
8.2.170.0150.00022.96
8.2.160.0110.00320.70
8.2.150.0050.00324.18
8.2.140.0130.00724.66
8.2.130.0130.00326.16
8.2.120.0000.00820.07
8.2.110.0070.00322.36
8.2.100.0080.00519.65
8.2.90.0000.00819.59
8.2.80.0030.00519.09
8.2.70.0040.00418.00
8.2.60.0070.00718.15
8.2.50.0030.00618.07
8.2.40.0000.00818.34
8.2.30.0040.00418.50
8.2.20.0080.00018.04
8.2.10.0000.00718.09
8.2.00.0050.00518.02
8.1.270.0040.00424.66
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0090.00023.99
8.1.230.0080.00319.32
8.1.220.0030.00717.90
8.1.210.0040.00418.77
8.1.200.0030.01017.48
8.1.190.0050.00317.77
8.1.180.0030.00520.48
8.1.170.0000.00818.90
8.1.160.0040.00422.33
8.1.150.0040.00418.80
8.1.140.0060.00317.69
8.1.130.0000.00818.03
8.1.120.0040.00717.85
8.1.110.0030.00517.58
8.1.100.0080.00017.82
8.1.90.0070.00017.69
8.1.80.0000.00717.66
8.1.70.0030.00317.72
8.1.60.0060.00317.77
8.1.50.0000.00817.78
8.1.40.0000.00817.66
8.1.30.0080.00017.88
8.1.20.0030.00617.89
8.1.10.0040.00417.79
8.1.00.0000.00817.72
8.0.300.0000.00718.77
8.0.290.0070.00017.41
8.0.280.0030.00318.72
8.0.270.0030.00317.45
8.0.260.0030.00317.07
8.0.250.0040.00417.13
8.0.240.0000.00817.05
8.0.230.0050.00317.02
8.0.220.0040.00417.14
8.0.210.0050.00216.96
8.0.200.0040.00716.95
8.0.190.0000.00717.10
8.0.180.0000.00817.10
8.0.170.0000.00817.07
8.0.160.0030.00417.10
8.0.150.0080.00017.01
8.0.140.0030.00617.11
8.0.130.0030.00313.55
8.0.120.0080.00017.10
8.0.110.0020.00517.19
8.0.100.0040.00417.04
8.0.90.0040.00417.03
8.0.80.0120.00317.07
8.0.70.0000.00817.18
8.0.60.0000.00717.14
8.0.50.0040.00417.10
8.0.30.0100.01017.35
8.0.20.0040.01617.48
8.0.10.0030.00616.96
8.0.00.0100.01016.89
7.4.330.0000.00515.00
7.4.320.0000.00716.73
7.4.300.0030.00316.54
7.4.290.0000.00716.62
7.4.280.0030.00316.70
7.4.270.0000.00716.77
7.4.260.0030.00416.64
7.4.250.0070.00016.59
7.4.240.0050.00216.60
7.4.230.0070.00016.54
7.4.220.0140.00316.77
7.4.210.0080.00916.72
7.4.200.0040.00416.70
7.4.190.0070.00016.85
7.4.160.0140.01016.49
7.4.150.0090.00917.40
7.4.140.0100.01317.86
7.4.130.0110.00616.69
7.4.120.0110.00916.60
7.4.110.0060.01216.71
7.4.100.0080.01116.54
7.4.90.0090.00916.50
7.4.80.0090.00919.39
7.4.70.0060.01216.71
7.4.60.0090.00816.45
7.4.50.0040.00016.64
7.4.40.0130.00322.77
7.4.30.0030.01516.67
7.4.00.0100.00314.90
7.3.330.0020.00213.28
7.3.320.0050.00013.17
7.3.310.0080.00016.44
7.3.300.0000.00716.39
7.3.290.0140.00016.46
7.3.280.0070.00816.41
7.3.270.0090.00917.40
7.3.260.0130.00716.74
7.3.250.0060.01116.50
7.3.240.0140.00416.35
7.3.230.0150.01216.89
7.3.210.0080.01016.36
7.3.200.0120.00319.39
7.3.190.0170.00916.61
7.3.180.0090.00616.69
7.3.170.0060.01316.73
7.3.160.0170.00016.61
7.3.120.0130.00314.65
7.2.330.0130.00616.69
7.2.320.0090.01216.89
7.2.310.0090.00916.95
7.2.300.0120.00616.52
7.2.290.0060.01016.76
7.2.00.0000.01719.78
7.1.100.0040.01117.91
7.1.70.0000.00817.35
7.1.60.0160.00919.21
7.1.50.0070.01017.18
7.1.00.0030.07322.27
7.0.200.0400.00315.10
7.0.140.0030.07322.18
7.0.90.0570.07719.88
7.0.80.0530.09019.89
7.0.70.0570.07719.92
7.0.60.0570.06020.02
7.0.50.0700.06320.29
7.0.40.0030.08720.09
7.0.30.0070.08020.23
7.0.20.0030.06320.05
7.0.10.0070.08720.04
7.0.00.0100.05720.09
5.6.280.0100.07020.98
5.6.240.0070.07020.66
5.6.230.0030.06020.66
5.6.220.0130.07720.73
5.6.210.0100.04020.55
5.6.200.0030.09321.12
5.6.190.0100.05721.03
5.6.180.0170.06721.04
5.6.170.0030.05721.05
5.6.160.0130.06320.93
5.6.150.0100.06721.17
5.6.140.0100.08021.04
5.6.130.0000.06721.07
5.6.120.0030.05021.04
5.6.110.0030.09321.06
5.6.100.0130.07721.00
5.6.90.0170.04721.05
5.6.80.0030.08320.39
5.6.70.0130.06720.36
5.6.60.0070.04320.33
5.6.50.0070.05320.43
5.6.40.0030.05720.43
5.6.30.0000.04720.43
5.6.20.0070.08020.30
5.6.10.0030.07020.27
5.6.00.0030.06720.42
5.5.380.0070.05020.50
5.5.370.0030.05320.49
5.5.360.0070.04020.55
5.5.350.0000.08720.32
5.5.340.0200.06720.79
5.5.330.0070.06720.74
5.5.320.0170.06720.83
5.5.310.0030.06320.86
5.5.300.0200.07320.82
5.5.290.0030.05320.81
5.5.280.0100.04320.79
5.5.270.0130.04720.80
5.5.260.0000.06720.86
5.5.250.0000.07720.70
5.5.240.0200.06720.19
5.5.230.0000.06020.15
5.5.220.0030.05020.17
5.5.210.0030.04720.27
5.5.200.0070.04720.27
5.5.190.0170.04719.99
5.5.180.0170.04320.21
5.5.160.0100.08720.26
5.5.150.0100.03720.27
5.5.140.0030.05020.22
5.5.130.0030.05020.21
5.5.120.0170.07320.26
5.5.110.0000.04720.20
5.5.100.0130.06720.17
5.5.90.0070.04320.06
5.5.80.0030.04720.11
5.5.70.0100.08319.96
5.5.60.0170.06719.94
5.5.50.0000.07019.96
5.5.40.0100.07320.13
5.5.30.0370.06020.05
5.5.20.0130.03020.09
5.5.10.0070.07720.03
5.5.00.0100.07019.96
5.4.450.0000.05319.45
5.4.440.0100.05019.44
5.4.430.0000.05319.27
5.4.420.0070.07719.10
5.4.410.0100.03719.16
5.4.400.0030.07319.07
5.4.390.0100.07018.96
5.4.380.0070.04319.03
5.4.370.0100.07019.10
5.4.360.0030.04018.90
5.4.350.0100.06319.08
5.4.340.0000.04319.11
5.4.320.0070.04319.06
5.4.310.0000.07318.98
5.4.300.0100.07319.09
5.4.290.0070.05019.07
5.4.280.0070.08019.22
5.4.270.0070.04319.22
5.4.260.0070.03719.02
5.4.250.0070.07319.09
5.4.240.0100.07318.97
5.4.230.0100.06719.12
5.4.220.0030.04319.13
5.4.210.0030.05719.02
5.4.200.0030.07718.94
5.4.190.0070.07319.22
5.4.180.0200.06019.02
5.4.170.0070.07318.77
5.4.160.0000.08318.96
5.4.150.0030.06019.07
5.4.140.0030.04316.29
5.4.130.0100.06716.31
5.4.120.0130.06716.32
5.4.110.0000.05316.34
5.4.100.0070.06716.40
5.4.90.0070.04316.45
5.4.80.0030.07316.31
5.4.70.0030.03716.20
5.4.60.0030.05316.30
5.4.50.0100.06316.19
5.4.40.0000.05316.47
5.4.30.0100.04016.37
5.4.20.0230.05316.17
5.4.10.0070.04016.23
5.4.00.0030.06315.72
5.3.290.0030.05314.52
5.3.280.0070.06714.57
5.3.270.0000.05714.55
5.3.260.0070.07714.53
5.3.250.0170.06014.59
5.3.240.0030.06714.58
5.3.230.0130.06014.57
5.3.220.0070.07314.56
5.3.210.0070.05014.56
5.3.200.0000.08014.43
5.3.190.0030.07714.51
5.3.180.0030.07714.58
5.3.170.0000.04714.57
5.3.160.0070.07714.55
5.3.150.0100.04014.56
5.3.140.0130.07014.42
5.3.130.0070.07714.41
5.3.120.0030.07314.37
5.3.110.0100.05014.40
5.3.100.0170.06313.97
5.3.90.0070.07014.00
5.3.80.0130.06714.00
5.3.70.0100.05713.92
5.3.60.0130.06713.98
5.3.50.0170.03013.80
5.3.40.0130.07013.86
5.3.30.0030.03713.90
5.3.20.0100.05013.68
5.3.10.0000.07313.65
5.3.00.0070.03713.59
5.2.170.0030.06711.21
5.2.160.0100.05710.99
5.2.150.0030.04311.16
5.2.140.0070.06010.97
5.2.130.0030.07310.95
5.2.120.0070.06310.91
5.2.110.0100.03710.89
5.2.100.0070.03711.16
5.2.90.0030.06011.11
5.2.80.0100.02711.09
5.2.70.0100.05310.92
5.2.60.0000.03710.96
5.2.50.0000.03310.84
5.2.40.0000.06310.95
5.2.30.0070.06010.96
5.2.20.0030.06010.80
5.2.10.0030.04010.88
5.2.00.0100.05310.85
5.1.60.0070.0479.88
5.1.50.0030.04710.00
5.1.40.0070.0339.99
5.1.30.0000.04310.38
5.1.20.0070.02710.27
5.1.10.0000.04010.05
5.1.00.0070.05010.12
5.0.50.0070.0438.54
5.0.40.0070.0208.47
5.0.30.0030.0708.21
5.0.20.0030.0408.29
5.0.10.0100.0338.17
5.0.00.0000.0578.00
4.4.90.0030.0307.11
4.4.80.0070.0337.11
4.4.70.0000.0377.11
4.4.60.0000.0377.11
4.4.50.0000.0307.11
4.4.40.0030.0507.11
4.4.30.0000.0337.11
4.4.20.0030.0307.11
4.4.10.0000.0377.11
4.4.00.0070.0377.11
4.3.110.0000.0307.11
4.3.100.0070.0337.11
4.3.90.0000.0377.11
4.3.80.0030.0537.11
4.3.70.0030.0337.11
4.3.60.0030.0177.11
4.3.50.0000.0337.11
4.3.40.0030.0507.11
4.3.30.0000.0377.11
4.3.20.0030.0277.11
4.3.10.0000.0277.11
4.3.00.0030.0177.11

preferences:
44.78 ms | 400 KiB | 5 Q