3v4l.org

run code in 300+ PHP versions simultaneously
<?php $jis_bytes = '1b244224221b2842'; // 'あ' in ISO-2022-JP $jis_bytes_without_esc = '1b24422422'; // 'あ' in ISO-2022-JP without escape sequence var_dump(mb_check_encoding(hex2bin($jis_bytes), 'JIS')); var_dump(mb_check_encoding(hex2bin($jis_bytes_without_esc), 'JIS')); var_dump(mb_check_encoding(hex2bin($jis_bytes_without_esc), 'ISO-2022-JP-2004')); var_dump(mb_check_encoding(hex2bin($jis_bytes_without_esc), 'ISO-2022-JP-MS')); var_dump(mb_check_encoding(hex2bin($jis_bytes_without_esc), 'CP50220')); var_dump(mb_check_encoding(hex2bin($jis_bytes_without_esc), 'CP50221')); var_dump(mb_check_encoding(hex2bin($jis_bytes_without_esc), 'CP50222')); var_dump(mb_check_encoding(hex2bin($jis_bytes_without_esc), 'ISO-2022-JP-MOBILE#KDDI'));

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.5.10.0110.00620.12
8.5.00.0200.01019.91
8.4.160.0120.00923.87
8.4.150.0030.00014.05
8.4.140.0130.00817.67
8.4.130.0140.00718.20
8.4.120.0110.00920.66
8.4.110.0070.00220.45
8.4.100.0070.00617.84
8.4.90.0130.00820.44
8.4.80.0070.00220.61
8.4.70.0120.00617.90
8.4.60.0120.00918.76
8.4.50.0090.00619.39
8.4.40.0040.01520.57
8.4.30.0030.00620.25
8.4.20.0130.00620.02
8.4.10.0150.00323.52
8.3.280.0020.00014.05
8.3.270.0120.01016.44
8.3.260.0040.00516.39
8.3.250.0130.00616.64
8.3.240.0080.01116.61
8.3.230.0100.00916.32
8.3.220.0110.00720.54
8.3.210.0110.00816.70
8.3.200.0050.00316.80
8.3.190.0040.00418.82
8.3.180.0120.00716.72
8.3.170.0090.00019.06
8.3.160.0060.00318.33
8.3.150.0160.00620.59
8.3.140.0120.00616.62
8.3.130.0070.00418.50
8.3.120.0030.00718.86
8.3.110.0060.00316.55
8.3.100.0040.00416.49
8.3.90.0040.00426.77
8.3.80.0050.00516.50
8.3.70.0160.00618.14
8.3.60.0070.00716.38
8.3.50.0040.01116.56
8.3.40.0070.00720.20
8.3.30.0120.00318.49
8.3.20.0040.00424.18
8.3.10.0030.00624.66
8.3.00.0000.00826.16
8.2.290.0120.00917.62
8.2.280.0050.00518.45
8.2.270.0110.00617.20
8.2.260.0070.01116.84
8.2.250.0080.00016.98
8.2.240.0040.00416.75
8.2.230.0080.00020.94
8.2.220.0130.01024.06
8.2.210.0140.00026.77
8.2.200.0060.00316.75
8.2.190.0100.01017.00
8.2.180.0100.01017.00
8.2.170.0150.00019.22
8.2.160.0070.00722.96
8.2.150.0040.00425.66
8.2.140.0080.00024.66
8.2.130.0110.00426.16
8.2.120.0080.00026.16
8.2.110.0110.00019.63
8.2.100.0000.01117.94
8.2.90.0050.00519.30
8.2.80.0090.00017.97
8.2.70.0000.00817.75
8.2.60.0000.00918.18
8.2.50.0040.00418.10
8.2.40.0030.00618.02
8.2.30.0130.00417.62
8.2.20.0090.00019.47
8.2.10.0110.00617.62
8.2.00.0160.00017.62
8.1.330.0130.00616.42
8.1.320.0100.00916.53
8.1.310.0090.00018.66
8.1.300.0060.01316.59
8.1.290.0060.00318.88
8.1.280.0100.01025.92
8.1.270.0080.00024.66
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0060.00324.08
8.1.230.0090.00317.83
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0000.01017.60
8.1.190.0040.00417.60
8.1.180.0000.00818.10
8.1.170.0080.00317.62
8.1.160.0110.00617.62
8.1.150.0130.00617.62
8.1.140.0080.00917.62
8.1.130.0160.00017.62
8.1.120.0060.01217.62
8.1.110.0040.01219.04
8.1.100.0080.00917.62
8.1.90.0110.00517.62
8.1.80.0090.01017.62
8.1.70.0170.00017.62
8.1.60.0000.01817.62
8.1.50.0140.00517.62
8.1.40.0110.01117.62
8.1.30.0130.00717.62
8.1.20.0090.00917.62
8.1.10.0150.00417.62
8.1.00.0170.00317.62
8.0.300.0040.00418.77
8.0.290.0060.00316.75
8.0.280.0060.01217.62
8.0.270.0160.00017.62
8.0.260.0060.01217.62
8.0.250.0130.00517.62
8.0.240.0080.01118.45
8.0.230.0180.00017.62
8.0.220.0110.00817.62
8.0.210.0120.00417.62
8.0.200.0140.00317.62
8.0.190.0170.00017.62
8.0.180.0120.00417.62
8.0.170.0090.00917.62
8.0.160.0100.00617.62
8.0.150.0150.00317.62
8.0.140.0110.00717.62
8.0.130.0130.00317.62
8.0.120.0150.00217.62
8.0.110.0170.00017.62
8.0.100.0100.00817.62
8.0.90.0160.00317.62
8.0.80.0170.00017.62
8.0.70.0100.00717.62
8.0.60.0120.00817.62
8.0.50.0170.00317.62
8.0.30.0140.00417.62
8.0.20.0110.00717.62
8.0.10.0130.00318.62

preferences:
42.43 ms | 403 KiB | 5 Q