PHPackages                             bolstad/textcalculate - 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. bolstad/textcalculate

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

bolstad/textcalculate
=====================

Evaluate string based calculations

1(9y ago)02.2k[1 issues](https://github.com/bolstad/TextCalculate/issues)MITPHP

Since Apr 23Pushed 9y ago1 watchersCompare

[ Source](https://github.com/bolstad/TextCalculate)[ Packagist](https://packagist.org/packages/bolstad/textcalculate)[ RSS](/packages/bolstad-textcalculate/feed)WikiDiscussions master Synced 2w ago

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

TextCalculate
=============

[](#textcalculate)

Perform calculation on strings and replace placeholders according as configured in an array.

Example:

```
Given that ITEMS_SOLD = 10 & TAX_RATE = 0.25 AND PROCESS_FEE = 3,
calculate() can solve and return the result for '((ITEMS_SOLD * 15) + PROCESS_FEE) * 0.25'

```

Please see `tests/PlaceholderCalcTest.php` for example code

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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

3355d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0ec058cc342db8fb862c97b2276cddd2127047ad6972140cbad9bff146a8825d?d=identicon)[bolstad](/maintainers/bolstad)

---

Top Contributors

[![bolstad](https://avatars.githubusercontent.com/u/62787?v=4)](https://github.com/bolstad "bolstad (12 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bolstad-textcalculate/health.svg)

```
[![Health](https://phpackages.com/badges/bolstad-textcalculate/health.svg)](https://phpackages.com/packages/bolstad-textcalculate)
```

###  Alternatives

[phar-io/version

Library for handling version information and constraints

7.5k770.9M51](/packages/phar-io-version)[illuminate/collections

The Illuminate Collections package.

27075.6M1.0k](/packages/illuminate-collections)

PHPackages © 2026

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