3v4l.org

run code in 300+ PHP versions simultaneously
<?php // When converting halfwidth kana to JIS, mbfilter use JIS X 0201 kana. // string(22) "1b284931323334351b2842" var_dump(bin2hex(mb_convert_encoding(hex2bin('b1b2b3b4b5'), 'JIS', 'JIS'))); // < 8.0, mb_check_encoding compares before and after conversion to the same encoding. // bool(false) // >= 8.1, it is based only on successful conversion to wchar. // bool(true) var_dump(mb_check_encoding(hex2bin('b1b2b3b4b5'), 'JIS'));

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.0080.00820.14
8.5.00.0130.00819.82
8.4.150.0020.00014.05
8.4.140.0120.00817.57
8.4.130.0070.00318.02
8.4.120.0060.00325.71
8.4.110.0100.00722.57
8.4.100.0070.01018.40
8.4.90.0110.00518.80
8.4.80.0060.00218.41
8.4.70.0090.01018.07
8.4.60.0150.00718.90
8.4.50.0120.00818.62
8.4.40.0150.00323.79
8.4.30.0000.00920.71
8.4.20.0100.01020.66
8.4.10.0090.00023.66
8.3.280.0150.00618.57
8.3.270.0090.01016.54
8.3.260.0130.00716.71
8.3.250.0040.00419.05
8.3.240.0120.00717.21
8.3.230.0130.00616.60
8.3.220.0090.00818.85
8.3.210.0050.00416.62
8.3.200.0050.00516.61
8.3.190.0120.00517.18
8.3.180.0120.00617.01
8.3.170.0140.00318.97
8.3.160.0000.00717.13
8.3.150.0070.01517.22
8.3.140.0040.00416.53
8.3.130.0060.00318.44
8.3.120.0030.00620.72
8.3.110.0060.00316.54
8.3.100.0160.00024.06
8.3.90.0040.00426.77
8.3.80.0060.00318.29
8.3.70.0070.01016.48
8.3.60.0140.00318.43
8.3.50.0110.00316.79
8.3.40.0030.01021.88
8.3.30.0060.00918.76
8.3.20.0040.00424.18
8.3.10.0000.00824.66
8.3.00.0050.00226.16
8.2.290.0110.00722.49
8.2.280.0120.00820.49
8.2.270.0110.00717.34
8.2.260.0100.00716.56
8.2.250.0040.00718.34
8.2.240.0090.00918.75
8.2.230.0060.00320.94
8.2.220.0170.00337.54
8.2.210.0040.00426.77
8.2.200.0090.00018.54
8.2.190.0110.00716.75
8.2.180.0140.00416.75
8.2.170.0180.00018.91
8.2.160.0030.01022.96
8.2.150.0070.00025.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0080.00021.16
8.2.110.0030.00621.36
8.2.100.0030.00819.59
8.2.90.0030.00517.84
8.2.80.0050.00319.11
8.2.70.0090.00017.75
8.2.60.0070.00617.63
8.2.50.0040.00417.61
8.2.40.0060.00319.48
8.2.30.0110.00617.50
8.2.20.0080.00019.35
8.2.10.0060.00917.50
8.2.00.0130.00317.50
8.1.330.0100.00821.65
8.1.320.0150.01016.14
8.1.310.0070.01016.64
8.1.300.0090.00020.22
8.1.290.0040.00430.84
8.1.280.0170.00025.92
8.1.270.0050.00324.66
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0000.00822.27
8.1.230.0040.00722.87
8.1.220.0060.00317.74
8.1.210.0000.00819.17
8.1.200.0060.00317.38
8.1.190.0050.00317.35
8.1.180.0040.00418.10
8.1.170.0060.00317.62
8.1.160.0160.00017.50
8.1.150.0130.00317.50
8.1.140.0100.00517.50
8.1.130.0140.00317.50
8.1.120.0100.00617.50
8.1.110.0050.01017.50
8.1.100.0080.00817.50
8.1.90.0140.00217.50
8.1.80.0130.00417.50
8.1.70.0160.00017.50
8.1.60.0160.00317.50
8.1.50.0130.00417.50
8.1.40.0100.00717.50
8.1.30.0180.00017.50
8.1.20.0120.00617.50
8.1.10.0130.00317.50
8.1.00.0090.00917.50
8.0.300.0040.00420.20
8.0.290.0040.00416.75
8.0.280.0110.00517.50
8.0.270.0120.00417.50
8.0.260.0070.01117.50
8.0.250.0160.00017.50
8.0.240.0160.00017.50
8.0.230.0120.00417.50
8.0.220.0130.00317.50
8.0.210.0170.00017.50
8.0.200.0130.00317.50
8.0.190.0130.00317.50
8.0.180.0100.00517.50
8.0.170.0100.00717.50
8.0.160.0120.00617.50
8.0.150.0130.00417.50
8.0.140.0160.00017.50
8.0.130.0120.00417.50
8.0.120.0040.01217.50
8.0.110.0090.00517.50
8.0.100.0040.01317.50
8.0.90.0150.00017.50
8.0.80.0130.00417.50
8.0.70.0160.00017.50
8.0.60.0160.00417.50
8.0.50.0050.01017.50
8.0.30.0120.00517.50
8.0.20.0110.00517.50
8.0.10.0090.00617.50

preferences:
35.7 ms | 403 KiB | 5 Q