phpscalebcmath

PHP|BCMath: How to get bcscale value?


How do I get the scale set in BCMath's bcscale() method?

Example:

bcscale(25);

How do I get the 25? Thanks!


Solution

  • This is fixed in PHP 7.3.

    Calling bcscale(10) will return the previous scale and calling bcscale() will return the current scale.

    source