3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(mb_check_encoding(hex2bin("1b284931323334351b2842"), "ISO-2022-JP")); // false is expected var_dump(mb_check_encoding(hex2bin("0e31323334350f"), "ISO-2022-JP")); // false is expected var_dump(mb_check_encoding(hex2bin("B1B2B3B4B5"), "ISO-2022-JP")); // false is expected echo "\n"; var_dump(mb_check_encoding(hex2bin("1b284931323334351b2842"), "JIS")); // true is expected var_dump(mb_check_encoding(hex2bin("0e31323334350f"), "JIS")); // true is expected var_dump(mb_check_encoding(hex2bin("B1B2B3B4B5"), "JIS")); // true is expected

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.4.140.0130.00817.46
8.4.130.0080.00720.30
8.4.120.0150.00420.63
8.4.110.0150.00522.57
8.4.100.0050.00420.52
8.4.90.0120.00918.85
8.4.80.0130.00720.56
8.4.70.0040.00417.99
8.4.60.0120.00418.53
8.4.50.0140.00720.33
8.4.40.0030.00520.53
8.4.30.0060.00320.42
8.4.20.0100.01019.77
8.4.10.0060.00323.64
8.3.260.0050.00416.73
8.3.250.0060.00218.81
8.3.240.0060.00218.88
8.3.230.0100.01016.40
8.3.220.0070.00118.73
8.3.210.0120.00816.67
8.3.200.0060.00316.21
8.3.190.0120.00616.98
8.3.180.0070.00816.64
8.3.170.0070.00018.86
8.3.160.0140.00316.98
8.3.150.0160.00317.14
8.3.140.0070.01116.36
8.3.130.0080.00016.49
8.3.120.0110.00018.72
8.3.110.0040.00416.49
8.3.100.0140.00424.06
8.3.90.0090.00626.77
8.3.80.0060.00317.97
8.3.70.0090.01216.50
8.3.60.0180.00016.38
8.3.50.0040.01116.37
8.3.40.0100.01021.85
8.3.30.0130.00318.46
8.3.20.0040.00424.18
8.3.10.0040.00424.66
8.3.00.0000.00826.16
8.2.290.0110.00820.20
8.2.280.0090.00918.66
8.2.270.0080.00616.96
8.2.260.0040.01416.66
8.2.250.0060.00316.66
8.2.240.0050.00317.26
8.2.230.0030.00520.94
8.2.220.0060.00337.54
8.2.210.0080.00026.77
8.2.200.0060.00316.75
8.2.190.0150.00718.61
8.2.180.0000.01516.63
8.2.170.0110.00418.94
8.2.160.0100.00322.96
8.2.150.0000.00925.66
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00426.16
8.2.110.0060.00322.32
8.2.100.0080.00317.72
8.2.90.0030.00617.84
8.2.80.0000.00818.95
8.2.70.0060.00317.62
8.2.60.0040.00417.75
8.2.50.0000.00818.18
8.2.40.0060.00319.35
8.2.30.0100.00317.62
8.2.20.0000.00817.63
8.2.10.0120.00317.62
8.2.00.0140.00317.62
8.1.330.0130.00421.86
8.1.320.0110.00715.94
8.1.310.0100.00718.63
8.1.300.0030.00516.78
8.1.290.0000.01030.84
8.1.280.0140.00725.92
8.1.270.0030.00624.66
8.1.260.0000.00726.35
8.1.250.0080.00028.09
8.1.240.0000.00919.03
8.1.230.0090.00317.89
8.1.220.0040.00417.78
8.1.210.0040.00418.77
8.1.200.0000.00817.36
8.1.190.0040.00417.35
8.1.180.0030.00518.10
8.1.170.0040.00417.62
8.1.160.0110.00517.62
8.1.150.0100.00517.62
8.1.140.0150.00317.62
8.1.130.0170.00017.62
8.1.120.0130.00317.62
8.1.110.0120.00417.62
8.1.100.0000.01617.62
8.1.90.0120.00917.62
8.1.80.0120.00417.62
8.1.70.0110.00617.62
8.1.60.0110.00617.62
8.1.50.0180.00017.62
8.1.40.0130.00717.62
8.1.30.0140.00317.62
8.1.20.0060.01217.62
8.1.10.0170.00017.62
8.1.00.0100.00717.62
8.0.300.0060.00318.77
8.0.290.0000.00916.88
8.0.280.0080.00817.62
8.0.270.0050.01017.62
8.0.260.0040.01117.62
8.0.250.0130.00317.62
8.0.240.0100.00717.62
8.0.230.0100.01017.62
8.0.220.0170.00017.62
8.0.210.0130.00317.62
8.0.200.0090.00717.62
8.0.190.0090.00717.62
8.0.180.0130.00317.62
8.0.170.0040.01217.62
8.0.160.0120.00517.62
8.0.150.0170.00017.62
8.0.140.0060.01217.62
8.0.130.0070.00917.62
8.0.120.0160.00017.62
8.0.110.0120.00317.62
8.0.100.0110.00517.62
8.0.90.0110.00717.62
8.0.80.0150.00017.62
8.0.70.0050.01117.62
8.0.60.0080.00817.62
8.0.50.0130.00317.62
8.0.30.0160.00017.62
8.0.20.0120.00317.62
8.0.10.0140.00317.62

preferences:
84.45 ms | 403 KiB | 5 Q