final class Decimal128 implements Type, Decimal128Interface, Serializable, JsonSerializable (View source)

BSON type for the Decimal128 floating-point format, which supports numbers with up to 34 decimal digits (i.e. significant digits) and an exponent range of −6143 to +6144.

Methods

__construct(string $value = '')

Construct a new Decimal128

string
__toString()

Returns the string representation of this Decimal128

static 
__set_state(array $properties)

No description

string|null
serialize()

Serialize a Decimal128

void
unserialize(string $data)

Unserialize a Decimal128

mixed
jsonSerialize()

Returns a representation that can be converted to JSON

Details

final __construct(string $value = '')

Construct a new Decimal128

Parameters

string $value

A decimal string.

final string __toString()

Returns the string representation of this Decimal128

Return Value

string

Returns the string representation of this Decimal128Interface

static __set_state(array $properties)

No description

Parameters

array $properties

final string|null serialize()

Since: 1.2.0

Serialize a Decimal128

Return Value

string|null

The string representation of the object or null

Exceptions

InvalidArgumentException

final void unserialize(string $data)

Since: 1.2.0

Unserialize a Decimal128

Parameters

string $data

The string representation of the object.

Return Value

void

Exceptions

InvalidArgumentException
UnexpectedValueException

final mixed jsonSerialize()

Since: 1.2.0

Returns a representation that can be converted to JSON

Return Value

mixed

data which can be serialized by json_encode, which is a value of any type other than a resource.

Exceptions

InvalidArgumentException