Decimal
final class Decimal implements Value, Numeric (View source)
A PHP representation of the CQL decimal
datatype
The actual value of a decimal is $value * pow(10, $scale * -1)
Methods
__construct(string $value)
Creates a decimal from a given decimal string:
string
__toString()
String representation of this decimal.
string
value()
Numeric value of this decimal as string.
int
scale()
Scale of this decimal as int.
int
toInt()
No description
float
toDouble()
No description
Details
__construct(string $value)
Creates a decimal from a given decimal string:
<?php
$decimal = new Cassandra::Decimal("1313123123.234234234234234234123");
string
__toString()
String representation of this decimal.
Type
type()
The type of this decimal.
string
value()
Numeric value of this decimal as string.
int
scale()
Scale of this decimal as int.
Numeric
abs()
No description
Numeric
neg()
No description
Numeric
sqrt()
No description
int
toInt()
No description
float
toDouble()
No description