3v4l.org

run code in 300+ PHP versions simultaneously
<?php $detect = array('ASCII', 'Windows-1252', 'UTF-8', 'ISO-8859-15'); $num_before = null; $det_before = null; for ($num = 0; $num < 256; $num++) { $char = chr($num); $det = mb_detect_encoding($char, $detect, true); if ($det_before !== null) { if ($det !== $det_before) { printf("0x%02x - 0x%02x: %s\n", $num_before, $num - 1, $det_before); $det_before = $det; $num_before = $num; } } else { $det_before = $det; $num_before = $num; } } printf("0x%02x - 0x%02x: %s\n", $num_before, $num - 1, $det);

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.0060.00916.50
8.3.50.0120.00917.37
8.3.40.0120.00918.75
8.3.30.0110.00418.71
8.3.20.0040.00418.62
8.3.10.0000.00820.52
8.3.00.0080.00019.25
8.2.180.0140.00716.75
8.2.170.0140.00722.96
8.2.160.0140.00421.27
8.2.150.0040.00424.18
8.2.140.0060.00624.66
8.2.130.0080.00026.16
8.2.120.0090.00619.22
8.2.110.0070.00321.14
8.2.100.0040.00817.84
8.2.90.0050.00322.27
8.2.80.0080.00019.34
8.2.70.0060.00317.75
8.2.60.0000.00818.29
8.2.50.0000.00918.07
8.2.40.0000.00818.34
8.2.30.0100.00018.16
8.2.20.0070.00317.87
8.2.10.0040.00417.93
8.2.00.0100.00317.96
8.1.280.0130.00725.92
8.1.270.0080.00024.66
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0000.00922.48
8.1.230.0110.00021.22
8.1.220.0030.00617.74
8.1.210.0040.00419.07
8.1.200.0050.00517.47
8.1.190.0040.00417.78
8.1.180.0060.00318.10
8.1.170.0050.00319.01
8.1.160.0050.00318.94
8.1.150.0080.00018.76
8.1.140.0040.00417.57
8.1.130.0050.00218.07
8.1.120.0040.00417.51
8.1.110.0000.00717.62
8.1.100.0030.00517.52
8.1.90.0020.00517.66
8.1.80.0070.00017.50
8.1.70.0000.00717.53
8.1.60.0000.00817.71
8.1.50.0050.00317.60
8.1.40.0000.00817.51
8.1.30.0000.00817.66
8.1.20.0030.00517.77
8.1.10.0040.00417.75
8.1.00.0080.00017.67
8.0.300.0040.00419.98
8.0.290.0000.00916.75
8.0.280.0000.00818.44
8.0.270.0080.00017.34
8.0.260.0030.00316.90
8.0.250.0040.00417.02
8.0.240.0000.00916.91
8.0.230.0070.00017.03
8.0.220.0040.00416.99
8.0.210.0000.00716.93
8.0.200.0040.00416.96
8.0.190.0030.00617.05
8.0.180.0020.00516.86
8.0.170.0040.00417.01
8.0.160.0020.00517.02
8.0.150.0000.01017.04
8.0.140.0000.00916.96
8.0.130.0060.00013.32
8.0.120.0070.00016.81
8.0.110.0050.00317.01
8.0.100.0000.00816.94
8.0.90.0040.00416.88
8.0.80.0030.01316.91
8.0.70.0040.00416.95
8.0.60.0040.00416.95
8.0.50.0030.00617.01
8.0.30.0060.01317.12
8.0.20.0130.00717.04
8.0.10.0040.00417.01
8.0.00.0160.00616.68
7.4.330.0020.00213.04
7.4.320.0000.00716.66
7.4.300.0000.00716.74
7.4.290.0040.00416.72
7.4.280.0000.00916.71
7.4.270.0000.00716.67
7.4.260.0030.00313.37
7.4.250.0040.00416.59
7.4.240.0040.00416.78
7.4.230.0050.00316.72
7.4.220.0130.01016.69
7.4.210.0080.00816.73
7.4.200.0000.00716.57
7.4.190.0040.00416.54
7.4.160.0100.00616.73
7.4.150.0100.01716.61
7.4.140.0130.00816.55
7.4.130.0120.00516.49
7.4.120.0120.00616.48
7.4.110.0030.01616.60
7.4.100.0190.00616.55
7.4.90.0080.01216.47
7.4.80.0080.01619.39
7.4.70.0190.00616.54
7.4.60.0030.01316.57
7.4.50.0050.00316.51
7.4.40.0030.00916.49
7.4.30.0120.00616.41
7.4.00.0070.01015.12
7.3.330.0040.00413.34
7.3.320.0040.00413.26
7.3.310.0050.00216.43
7.3.300.0030.00316.36
7.3.290.0110.01116.53
7.3.280.0080.00816.49
7.3.270.0070.01116.48
7.3.260.0190.00616.74
7.3.250.0100.00816.57
7.3.240.0120.00416.44
7.3.230.0130.00416.46
7.3.210.0090.01316.75
7.3.200.0050.01716.68
7.3.190.0130.01016.55
7.3.180.0100.01016.69
7.3.170.0070.01016.47
7.3.160.0120.00416.40
7.3.120.0060.00914.92
7.2.330.0070.01316.91
7.2.320.0110.00716.66
7.2.310.0090.00916.55
7.2.300.0090.00916.78
7.2.290.0120.00916.54
7.2.60.0000.01417.02
7.1.200.0000.01216.07
7.1.100.0040.00418.28
7.1.70.0040.00417.36
7.1.60.0030.02019.40
7.1.50.0090.01316.81
7.1.00.0100.07322.31
7.0.200.0000.00916.67
7.0.140.0100.07022.08
7.0.120.0030.06322.19
7.0.60.0070.07319.87
7.0.50.0100.08017.88
7.0.40.0170.07720.04
7.0.30.0230.04020.09
7.0.20.0270.05320.11
7.0.10.0070.08320.08
7.0.00.0070.04020.12
5.6.280.0130.06720.92
5.6.210.0030.08720.75
5.6.200.0130.04018.18
5.6.190.0130.03320.45
5.6.180.0170.07320.67
5.6.170.0230.08020.49
5.6.160.0000.04720.50
5.6.150.0100.07718.18
5.6.140.0070.06318.13
5.6.130.0030.05318.20
5.6.120.0170.04720.95
5.6.110.0170.07720.98
5.6.100.0200.06321.13
5.6.90.0030.04720.95
5.6.80.0030.05320.56
5.6.70.2400.03720.38
5.5.350.0070.07320.41
5.5.340.0100.07717.89
5.5.330.0070.07720.26
5.5.320.0170.07020.50
5.5.310.0270.04720.27
5.5.300.0130.05717.98
5.5.290.0000.04717.98
5.5.280.0170.05020.73
5.5.270.0130.06720.86
5.5.260.0070.04320.73
5.5.250.0170.06320.57
5.5.240.0300.07320.26
5.4.450.0000.05019.11
5.4.440.0000.04319.13
5.4.430.0170.03319.13
5.4.420.0000.04019.47
5.4.410.0030.03718.98
5.4.400.0030.04019.18
5.4.390.0070.03319.00
5.4.380.0130.03019.09
5.4.370.0130.07319.17
5.4.360.0030.07718.79
5.4.350.0130.07019.14
5.4.340.0200.03019.12
5.4.320.0170.07319.17
5.4.310.0000.07019.20
5.4.300.0070.07018.91
5.4.290.0030.04319.19
5.4.280.0070.06019.17
5.4.270.0100.07718.80
5.4.260.0030.08319.08
5.4.250.0130.05719.07
5.4.240.0100.07018.80
5.4.230.0130.07019.17
5.4.220.0130.06019.02
5.4.210.0070.06718.78
5.4.200.0000.05018.81
5.4.190.0100.07018.99
5.4.180.0100.07319.13
5.4.170.0130.07319.17
5.4.160.0000.05718.77
5.4.150.0070.03719.05
5.4.140.0070.03716.31
5.4.130.0030.04016.16
5.4.120.0130.06716.48
5.4.110.0070.04716.36
5.4.100.0070.07016.40
5.4.90.0030.04716.37
5.4.80.0100.06316.25
5.4.70.0000.05016.48
5.4.60.0130.07016.38
5.4.50.0070.06316.34
5.4.40.0070.07016.21
5.4.30.0070.04316.35
5.4.20.0100.06716.26
5.4.10.0100.06016.57
5.4.00.0100.04315.89
5.3.290.0170.07314.59
5.3.280.0100.07714.56
5.3.270.0000.08714.48
5.3.260.0070.08714.71
5.3.250.0100.04714.55
5.3.240.0030.04314.55
5.3.230.0070.05314.57
5.3.220.0070.07314.50
5.3.210.0130.07014.50
5.3.200.0100.04714.36
5.3.190.0200.05314.35
5.3.180.0100.07014.52
5.3.170.0070.07314.50
5.3.160.0000.08014.58
5.3.150.0130.07714.51
5.3.140.0070.05314.51
5.3.130.0070.06014.49
5.3.120.0070.04714.44
5.3.110.0100.07314.52
5.3.100.0000.06313.82
5.3.90.0100.07013.96
5.3.80.0130.04314.00
5.3.70.0070.07313.84
5.3.60.0030.07313.84
5.3.50.0070.05013.88
5.3.40.0100.04013.94
5.3.30.0030.07713.83
5.3.20.0030.07313.66
5.3.10.0130.05313.59
5.3.00.0070.06313.54
5.2.170.0030.06011.02
5.2.160.0000.06711.08
5.2.150.0000.03311.09
5.2.140.0070.06011.04
5.2.130.0070.04010.95
5.2.120.0130.05011.03
5.2.110.0030.04711.12
5.2.100.0100.05710.98
5.2.90.0070.05311.03
5.2.80.0100.06011.02
5.2.70.0070.06311.08
5.2.60.0000.07010.98
5.2.50.0130.03710.94
5.2.40.0100.06010.93
5.2.30.0030.06710.91
5.2.20.0070.05310.90
5.2.10.0030.05010.86
5.2.00.0030.06710.75
5.1.60.0070.02710.05
5.1.50.0070.0539.96
5.1.40.0030.0439.88
5.1.30.0070.03310.38
5.1.20.0030.06010.34
5.1.10.0030.05010.05
5.1.00.0000.06010.05
5.0.50.0070.0238.57
5.0.40.0000.0338.33
5.0.30.0000.0678.33
5.0.20.0030.0438.33
5.0.10.0000.0338.33
5.0.00.0000.0738.33
4.4.90.0000.0238.33
4.4.80.0000.0278.33
4.4.70.0000.0408.33
4.4.60.0070.0238.33
4.4.50.0000.0238.33
4.4.40.0000.0578.33
4.4.30.0000.0208.33
4.4.20.0030.0378.33
4.4.10.0070.0238.33
4.4.00.0070.0508.33
4.3.110.0000.0238.33
4.3.100.0000.0238.33
4.3.90.0030.0278.33
4.3.80.0030.0538.33
4.3.70.0000.0178.33
4.3.60.0000.0378.33
4.3.50.0030.0178.33
4.3.40.0000.0508.33
4.3.30.0000.0208.33
4.3.20.0000.0338.33
4.3.10.0000.0378.33
4.3.00.0000.0178.33

preferences:
53.56 ms | 401 KiB | 5 Q