php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
BcMath\Number Class Reference
Inheritance diagram for BcMath\Number:
Stringable

Public Member Functions

 __construct (string|int $num)
 
 add (Number|string|int $num, ?int $scale=null)
 
 sub (Number|string|int $num, ?int $scale=null)
 
 mul (Number|string|int $num, ?int $scale=null)
 
 div (Number|string|int $num, ?int $scale=null)
 
 mod (Number|string|int $num, ?int $scale=null)
 
 divmod (Number|string|int $num, ?int $scale=null)
 
 powmod (Number|string|int $exponent, Number|string|int $modulus, ?int $scale=null)
 
 pow (Number|string|int $exponent, ?int $scale=null)
 
 sqrt (?int $scale=null)
 
 floor ()
 
 ceil ()
 
 round (int $precision=0, \RoundingMode $mode=\RoundingMode::HalfAwayFromZero)
 
 compare (Number|string|int $num, ?int $scale=null)
 
 __toString ()
 
 __serialize ()
 
 __unserialize (array $data)
 

Data Fields

string $value
 
int $scale
 

Detailed Description

@strict-properties

Definition at line 53 of file bcmath.stub.php.

Constructor & Destructor Documentation

◆ __construct()

BcMath\Number::__construct ( string|int $num)

Definition at line 60 of file bcmath.stub.php.

Member Function Documentation

◆ __serialize()

BcMath\Number::__serialize ( )

Definition at line 91 of file bcmath.stub.php.

◆ __toString()

BcMath\Number::__toString ( )

Implements Stringable.

Definition at line 89 of file bcmath.stub.php.

◆ __unserialize()

BcMath\Number::__unserialize ( array $data)

Definition at line 93 of file bcmath.stub.php.

◆ add()

BcMath\Number::add ( Number|string|int $num,
?int $scale = null )

Definition at line 62 of file bcmath.stub.php.

◆ ceil()

BcMath\Number::ceil ( )

Definition at line 83 of file bcmath.stub.php.

◆ compare()

BcMath\Number::compare ( Number|string|int $num,
?int $scale = null )

Definition at line 87 of file bcmath.stub.php.

◆ div()

BcMath\Number::div ( Number|string|int $num,
?int $scale = null )

Definition at line 68 of file bcmath.stub.php.

◆ divmod()

BcMath\Number::divmod ( Number|string|int $num,
?int $scale = null )
Returns
Number[]

Definition at line 73 of file bcmath.stub.php.

◆ floor()

BcMath\Number::floor ( )

Definition at line 81 of file bcmath.stub.php.

◆ mod()

BcMath\Number::mod ( Number|string|int $num,
?int $scale = null )

Definition at line 70 of file bcmath.stub.php.

◆ mul()

BcMath\Number::mul ( Number|string|int $num,
?int $scale = null )

Definition at line 66 of file bcmath.stub.php.

◆ pow()

BcMath\Number::pow ( Number|string|int $exponent,
?int $scale = null )

Definition at line 77 of file bcmath.stub.php.

◆ powmod()

BcMath\Number::powmod ( Number|string|int $exponent,
Number|string|int $modulus,
?int $scale = null )

Definition at line 75 of file bcmath.stub.php.

◆ round()

BcMath\Number::round ( int $precision = 0,
\RoundingMode $mode = \RoundingMode::HalfAwayFromZero )

Definition at line 85 of file bcmath.stub.php.

◆ sqrt()

BcMath\Number::sqrt ( ?int $scale = null)

Definition at line 79 of file bcmath.stub.php.

◆ sub()

BcMath\Number::sub ( Number|string|int $num,
?int $scale = null )

Definition at line 64 of file bcmath.stub.php.

Field Documentation

◆ $scale

int BcMath\Number::$scale

@virtual

Definition at line 58 of file bcmath.stub.php.

◆ $value

string BcMath\Number::$value

@virtual

Definition at line 56 of file bcmath.stub.php.


The documentation for this class was generated from the following file: