}
// Last character must be the separator
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-FILE-STACK: data(-1)=%s', dechex(ord(substr($data, -1, 1)))));
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-FILE-STACK: data(-1)=0x%s', dechex(ord(substr($data, -1, 1)))));
if (substr($data, -1, 1) !== chr(BinaryFile::SEPARATOR_HEADER_ENTRIES)) {
// Not valid separator
- throw new UnexpectedValueException(sprintf('data=%s does not have separator=%s at the end.',
+ throw new UnexpectedValueException(sprintf('data=%s does not have separator=0x%s at the end.',
$data,
- BinaryFile::SEPARATOR_HEADER_ENTRIES
+ dechex(BinaryFile::SEPARATOR_HEADER_ENTRIES)
));
}
$header = explode(chr(BinaryFile::SEPARATOR_HEADER_DATA), $data);
// Map numeric indexes to associative indexes
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-FILE-STACK: header()=%d', count($header)));
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-FILE-STACK: Calling ArrayUtils::mapNumericKeysToAssociative(%d) ...', count($header)));
$header = ArrayUtils::mapNumericKeysToAssociative($header, [
BinaryFile::HEADER_NAME_MAGIC,
BinaryFile::HEADER_NAME_TOTAL_ENTRIES,