private static function decodeDouble($length, &$bytes)
    {
        // Not enough bytes
        if ($length > count($bytes))
        {
            throw new CborException("The supplied byte string is too short to decode the specified double type.");
        }

        // Grab the required number of bytes
        $byteArray = array_splice($bytes, 0, $length);

        // Unpack a 32 bit double
        if ($length == 4)
        {
            return Float32::decode($byteArray);
        }

        // Unpack a 64 bit double
        else if ($length == 8)
        {
            return Float64::decode($byteArray);
        }

        // Unpack a 16 bit double
        else
        {
            return Float16::decode($byteArray);
        }
    }
private static function decodeDouble($length, &$bytes)
    {
        // Not enough bytes
        if ($length > count($bytes))
        {
            throw new CborException("The supplied byte string is too short to decode the specified double type.");
        }

        // Grab the required number of bytes
        $byteArray = array_splice($bytes, 0, $length);

        // Unpack a 32 bit double
        if ($length == 4)
        {
            return Float32::decode($byteArray);
        }

        // Unpack a 64 bit double
        else if ($length == 8)
        {
            return Float64::decode($byteArray);
        }

        // Unpack a 16 bit double
        else
        {
            return Float16::decode($byteArray);
        }
    }
private static function decodeDouble ( $ length , & $ bytes ) { // Not enough bytes if ( $ length > count ( $ bytes ) ) { throw new CborException ( "The supplied byte string is too short to decode the specified double type." ) ; } // Grab the required number of bytes $ byteArray = array_splice ( $ bytes , 0 , $ length ) ; // Unpack a 32 bit double if ( $ length == 4 ) { return Float32 :: decode ( $ byteArray ) ; } // Unpack a 64 bit double else if ( $ length == 8 ) { return Float64 :: decode ( $ byteArray ) ; } // Unpack a 16 bit double else { return Float16 :: decode ( $ byteArray ) ; } }
Decodes a double value.

@param int $length Size of the number, in bytes.
@param array $bytes The messages byte array.
@return float The decoded double.
@throws CborException If there aren't enough bytes in the remaining byte string.
Decodes a double value .