Download the PHP package illegal/fluent-bcmath without Composer
On this page you can find all versions of the php package illegal/fluent-bcmath. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download illegal/fluent-bcmath
More information about illegal/fluent-bcmath
Files in illegal/fluent-bcmath
Package fluent-bcmath
Short Description Fluent BCMath is a PHP package designed to simplify the usage of PHP's bcmath functions in a more fluid and intuitive way. With its expressive syntax and Laravel compatibility, it aims to improve the developer experience while working with arbitrary precision arithmetic operations.
License MIT
Informations about the package fluent-bcmath
fluent-bcmath
Fluent BcMath is a fluent interface for the PHP BcMath extension.
It helps you to write more readable code, while maintaining the performance of the BcMath extension.
Installation
Install the package via composer:
Usage
You have two options to use the fluent interface.
In both cases, there are two arguments: the number and the scale. The number can be:
- a string
- an integer
- a float
- another
BCNumber
instance
The scale is an integer, which represents the number of digits after the decimal point.
All methods return a new BCNumber
instance, so you can chain them.
For example:
1. Use the BCNumber
class
2. Use the fnum()
helper function
Available methods
If methods
Each operation has an if
method, which returns the result of the operation, if the condition is true.
Testing
License
The MIT License (MIT). Please see License File for more information.
All versions of fluent-bcmath with dependencies
ext-bcmath Version *