final public function readGuid()
    {
        $C = @unpack('V1V/v2v/N2N', $this->read(16));
        list($hex) = @unpack('H*0', pack('NnnNN', $C['V'], $C['v1'], $C['v2'], $C['N1'], $C['N2']));

        /* Fixes a bug in PHP versions earlier than Jan 25 2006 */
        if (implode('', unpack('H*', pack('H*', 'a'))) == 'a00') {
            // @codeCoverageIgnoreStart
            $hex = substr($hex, 0, -1);
        }
        // @codeCoverageIgnoreEnd

        return preg_replace('/^(.{8})(.{4})(.{4})(.{4})/', "\\1-\\2-\\3-\\4-", $hex);
    }
final public function readGuid()
    {
        $C = @unpack('V1V/v2v/N2N', $this->read(16));
        list($hex) = @unpack('H*0', pack('NnnNN', $C['V'], $C['v1'], $C['v2'], $C['N1'], $C['N2']));

        /* Fixes a bug in PHP versions earlier than Jan 25 2006 */
        if (implode('', unpack('H*', pack('H*', 'a'))) == 'a00') {
            // @codeCoverageIgnoreStart
            $hex = substr($hex, 0, -1);
        }
        // @codeCoverageIgnoreEnd

        return preg_replace('/^(.{8})(.{4})(.{4})(.{4})/', "\\1-\\2-\\3-\\4-", $hex);
    }
final public function readGuid ( ) { $ C = @ unpack ( 'V1V/v2v/N2N' , $ this -> read ( 16 ) ) ; list ( $ hex ) = @ unpack ( 'H*0' , pack ( 'NnnNN' , $ C [ 'V' ] , $ C [ 'v1' ] , $ C [ 'v2' ] , $ C [ 'N1' ] , $ C [ 'N2' ] ) ) ; /* Fixes a bug in PHP versions earlier than Jan 25 2006 */ if ( implode ( '' , unpack ( 'H*' , pack ( 'H*' , 'a' ) ) ) == 'a00' ) { // @codeCoverageIgnoreStart $ hex = substr ( $ hex , 0 , - 1 ) ; } // @codeCoverageIgnoreEnd return preg_replace ( '/^(.{8})(.{4})(.{4})(.{4})/' , "\\1-\\2-\\3-\\4-" , $ hex ) ; }
Reads 16 bytes from the stream and returns the little-endian ordered
binary data as mixed-ordered hexadecimal GUID string.

@return string
@throws InvalidStreamException if an I/O error occurs
Reads 16 bytes from the stream and returns the little - endian ordered binary data as mixed - ordered hexadecimal GUID string .