Introduction
Getting started
Welcome to the documentation for the Fluent BCMath PHP Package
What is PHP BCMath?
BCMath, short for Binary Calculator Mathematics, is a PHP extension designed to handle arbitrary-precision arithmetic operations with high accuracy. It is particularly useful for working with large integers or decimals that exceed the limits of PHP's built-in data types.
What is Fluent BCMath
The Fluent BCMath package provides an intuitive, fluent interface for the PHP BCMath extension, enabling you to write more readable and maintainable code without sacrificing the performance benefits of the underlying extension. With Fluent BCMath, you can effortlessly perform complex mathematical calculations while ensuring precision and reliability in your PHP applications.
use Illegal\FluentBCMath\BCNumber;
$num = new BCNumber('2', 2);
$num
->add(2)->sub(2)->mul(2); // 4