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 Dse\Decimal("1313123123.234234234234234234123");
$this->assertEquals(21, $decimal->scale());
$this->assertEquals("1313123123234234234234234234123", $decimal->value());
string
__toString
( )String representation of this decimal.
Dse\Type
type
( )The type of this decimal.
string
value
( )Dse\Numeric
value of this decimal as string.
int
scale
( )Scale of this decimal as int.
Dse\Numeric
abs
( )Dse\Numeric
neg
( )Dse\Numeric
sqrt
( )int
toInt
( )float