class Decimal
A PHP representation of the CQL decimal
datatype
The actual value of a decimal is $value * pow(10, $scale * -1)
Implements
Methods
__construct
(string
$value )
Creates a decimal from a given decimal string:
<?php
$decimal = new Cassandra\Decimal("1313123123.234234234234234234123");
$this->assertEquals(21, $decimal->scale());
$this->assertEquals("1313123123234234234234234234123", $decimal->value());
string
__toString
( )String representation of this decimal.
string
value
( )Cassandra\Numeric
value of this decimal as string.
int
scale
( )Scale of this decimal as int.
Cassandra\Numeric
abs
( )Cassandra\Numeric
neg
( )Cassandra\Numeric
sqrt
( )int
toInt
( )float