PHPackages                             dovab/big-number - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. dovab/big-number

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

dovab/big-number
================

Wrapper component for the bc math extension

1.0(5y ago)05MITPHPPHP &gt;=7.4.0

Since Mar 20Pushed 5y ago1 watchersCompare

[ Source](https://github.com/dovab/big-number)[ Packagist](https://packagist.org/packages/dovab/big-number)[ RSS](/packages/dovab-big-number/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

PHP wrapper for the BC Math extension
=====================================

[](#php-wrapper-for-the-bc-math-extension)

Wrapper to make working with the BC Math extension of PHP easier to use.

Installation
------------

[](#installation)

Install the package using composer: `composer require dovab/big-number`

Usage
-----

[](#usage)

Create an instance of `BigNumber` with the first value. The value can be an integer, float, or a really big number as a string.

After creating the instance you can manipulate the value using the provided functions:

- `add` - To add another value to it
- `subtract` - To subtract a value from it
- `multiply` - To multiply the value by the given value
- `divide` - To divide the value by the given value
- `modulus` - To get the modulus of the given value

For example:

```
$number = new BigNumber('4839276542939265829734291003');
$number->setScale(4)
    ->add(5)
    ->multiply(11.98)
    ->subtract(new BigNumber('19478320759'))
    ->divide('9894675903.83755');

echo $number;
```

The `BigNumber` instance also has methods to compare the value to another value:

- `equals`
- `greaterThan`
- `greaterThanOrEquals`
- `lowerThan`
- `lowerThenOrEquals`

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1877d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a62cbb3384e9f3f7210509a99fe253126843ea4cb47c0416e88552e0a98ad10a?d=identicon)[dovab](/maintainers/dovab)

---

Top Contributors

[![dovab](https://avatars.githubusercontent.com/u/14114399?v=4)](https://github.com/dovab "dovab (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/dovab-big-number/health.svg)

```
[![Health](https://phpackages.com/badges/dovab-big-number/health.svg)](https://phpackages.com/packages/dovab-big-number)
```

###  Alternatives

[yii2mod/yii2-markdown

Markdown Widget for Yii2

1347.7k5](/packages/yii2mod-yii2-markdown)[splitbrain/php-ringicon

A indenticon/glyphicon like avatar generator

1613.3k1](/packages/splitbrain-php-ringicon)[willywes/agora-sdk-php

Agora.io SDK PHP

1023.2k2](/packages/willywes-agora-sdk-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
