php8.5
Home/ Manual/ reference / bc/ The BcMath\Number class

The BcMath\Number class

A class for an arbitrary precision number. These objects support overloaded arithmetic and comparison operators.

Intro

A class for an arbitrary precision number. These objects support overloaded arithmetic and comparison operators.

Note

This class is not affected by the bcmath.scale INI directive set in Ini.

Note

The behavior of an overloaded operator is the same as specifying null for the scale parameter on the corresponding method.

Class synopsis

BcMathfinalreadonlyNumberimplementsStringablePropertiespublicstringvaluepublicintscaleMethods

Properties

value

A string representation of an arbitrary precision number.

scale

The scale value currently set on the object. For objects resulting from calculations, this value is automatically computed and set, unless the scale parameter was set in the calculation method.

Number

Source: reference/bc/bcmath.number.xml · from the official PHP manual (php/doc-en)