Fluent BCMath

A fluent interface for the PHP BCMath extension

Write more readable code, while maintaining the performance of the BCMath extension

use Illegal\FluentBCMath\BCNumber;
$num = new BCNumber('1.23', 2);

$num
	->add(2)->sub(2)->mul(2)
	->div(2)->mod(3)->pow(2)->sqrt();

Introduction

Installation

Effortlessly integrate fluent-bcmath into your application by utilizing Composer for installation.


composer require "illegal/fluent-bcmath"

Ready to go!

Once installed, you can immediately begin using the fluent interface; for more information, please consult the usage section.

Fluent BCMath is a project by illegal studio