private function readLong($stream, bool $isBigEndian): int
    {
        $result = unpack($isBigEndian ? 'N1' : 'V1', fread($stream, 4));
        $result = current($result);

        return (int) substr($result, -8);
    }
private function readLong($stream, bool $isBigEndian): int
    {
        $result = unpack($isBigEndian ? 'N1' : 'V1', fread($stream, 4));
        $result = current($result);

        return (int) substr($result, -8);
    }
private function readLong ( $ stream , bool $ isBigEndian ) : int { $ result = unpack ( $ isBigEndian ? 'N1' : 'V1' , fread ( $ stream , 4 ) ) ; $ result = current ( $ result ) ; return ( int ) substr ( $ result , - 8 ) ; }
Reads an unsigned long from stream respecting endianness.

@param resource $stream
Reads an unsigned long from stream respecting endianness .