kphp icon indicating copy to clipboard operation
kphp copied to clipboard

Unpack `H*` with an empty string produces warning: Not enough data to unpack with format "H*"

Open flaksp opened this issue 3 years ago • 0 comments

Following code:

var_export(unpack('H*', ''));

In PHP 7.4 it returns an empty string which is OK:

array (
  1 => '',
)

In KPHP it returns false and produces warning:

Warning: Not enough data to unpack with format "H*"

flaksp avatar Nov 24 '22 13:11 flaksp