|
BcMath\Number::__constructBcMath\Number オブジェクトを作成する 説明
public BcMath\Number::__construct(stringint
$num )int もしくは string の値から BcMath\Number オブジェクトを作成します。 パラメータ
エラー / 例外
このメソッドは、 例例1 BcMath\Number::__construct の例
上の例の出力は以下となります。 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) } 参考
|