|
BcMath\Number::__constructCreates a BcMath\Number object Description
public BcMath\Number::__construct(stringint
$num )Creates a BcMath\Number object from an int or string value. Parameters
Errors/Exceptions
This method throws a ValueError if ExamplesExample #1 BcMath\Number::__construct example
The above example will output: object(BcMath\Number)#1 (2) { ["value"]=> string(3) "100" ["scale"]=> int(0) } object(BcMath\Number)#2 (2) { ["value"]=> string(4) "-200" ["scale"]=> int(0) } object(BcMath\Number)#3 (2) { ["value"]=> string(6) "300.00" ["scale"]=> int(2) } See Also
|