Bigint
in package
Table of Contents
Properties
- $bytes : array<string|int, int>
Methods
- __construct() : mixed
- Initialize the bytes array
- add() : Bigint
- Add
- fromLowHigh() : Bigint
- Fill bytes from low to high
- getHex64() : string
- Get hexadecimal
- getHigh32() : int
- Get high 32
- getLow32() : int
- Get low 32
- getLowFF() : float
- Get low FF
- getValue() : int
- Get value from bytes array
- init() : Bigint
- Get an instance
- isOver32() : bool
- Check if is over 32
- fillBytes() : void
- Fill the bytes field with int
Properties
$bytes
private
array<string|int, int>
$bytes
= [0, 0, 0, 0, 0, 0, 0, 0]
Methods
__construct()
Initialize the bytes array
public
__construct([int $value = 0 ]) : mixed
Parameters
- $value : int = 0
add()
Add
public
add(Bigint $other) : Bigint
Parameters
- $other : Bigint
Return values
BigintfromLowHigh()
Fill bytes from low to high
public
static fromLowHigh(int $low, int $high) : Bigint
Parameters
- $low : int
- $high : int
Return values
BigintgetHex64()
Get hexadecimal
public
getHex64() : string
Return values
stringgetHigh32()
Get high 32
public
getHigh32() : int
Return values
intgetLow32()
Get low 32
public
getLow32() : int
Return values
intgetLowFF()
Get low FF
public
getLowFF([bool $force = false ]) : float
Parameters
- $force : bool = false
Return values
floatgetValue()
Get value from bytes array
public
getValue([int $end = 0 ][, int $length = 8 ]) : int
Parameters
- $end : int = 0
- $length : int = 8
Return values
intinit()
Get an instance
public
static init([int $value = 0 ]) : Bigint
Parameters
- $value : int = 0
Return values
BigintisOver32()
Check if is over 32
public
isOver32([bool $force = false ]) : bool
Parameters
- $force : bool = false
Tags
Return values
boolfillBytes()
Fill the bytes field with int
protected
fillBytes(int $value, int $start, int $count) : void
Parameters
- $value : int
- $start : int
- $count : int