PHP Class bandwidthThrottle\tokenBucket\util\DoublePacker

Author: Markus Malkusch ([email protected])
Mostra file Open project: bandwidth-throttle/token-bucket Class Usage Examples

Public Methods

Method Description
pack ( double $double ) : string Packs a 64 bit double into an 8 byte string.
unpack ( string $string ) : double Unpacks a 64 bit double from an 8 byte string.

Method Details

pack() public static method

Packs a 64 bit double into an 8 byte string.
public static pack ( double $double ) : string
$double double 64 bit double
return string packed 8 byte string representation

unpack() public static method

Unpacks a 64 bit double from an 8 byte string.
public static unpack ( string $string ) : double
$string string packed 8 byte string representation.
return double unpacked 64 bit double