src/Util.php
public static function packDouble($value)
    {
        $bin = pack('d', (float) $value);

        if (is_null(self::$little_endian)) {
            self::$little_endian = (pack('L', 1) == pack('V', 1));
        }

        if (self::$little_endian) {
            return $bin;
        }

        return self::swap($bin);
    }
public static function packDouble($value)
    {
        $bin = pack('d', (float) $value);

        if (is_null(self::$little_endian)) {
            self::$little_endian = (pack('L', 1) == pack('V', 1));
        }

        if (self::$little_endian) {
            return $bin;
        }

        return self::swap($bin);
    }
public static function packDouble ( $ value ) { $ bin = pack ( 'd' , ( float ) $ value ) ; if ( is_null ( self :: $ little_endian ) ) { self :: $ little_endian = ( pack ( 'L' , 1 ) == pack ( 'V' , 1 ) ) ; } if ( self :: $ little_endian ) { return $ bin ; } return self :: swap ( $ bin ) ; }
Encodes double value to correct endianity.

@param float $value Value to pack

@return string
Encodes double value to correct endianity .