PHPackages                             mld/simple-equation-solver - 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. mld/simple-equation-solver

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

mld/simple-equation-solver
==========================

Parse and solve simple math equations without using 'eval()'. Heavily inspired by the 'jlawrence/eos' library by Jon Lawrence.

0.0.1(9mo ago)02LGPL-2.1-or-laterPHPPHP ^5.6 || ^7.4 || ^8.4CI passing

Since Jul 15Pushed 5mo agoCompare

[ Source](https://github.com/mld/simple-equation-solver)[ Packagist](https://packagist.org/packages/mld/simple-equation-solver)[ RSS](/packages/mld-simple-equation-solver/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (2)Versions (3)Used By (0)

Simple Equation Solver
======================

[](#simple-equation-solver)

[![CI](https://github.com/mld/simple-equation-solver/actions/workflows/ci.yml/badge.svg)](https://github.com/mld/simple-equation-solver/actions/workflows/ci.yml)

A PHP library for solving simple equations with variables without using `eval()`.

It both converts equations from text (infix) format to RPN (postfix) format and solves RPN formatted equations, optionally with variables.

Supports addition, subtraction, multiplication, division, modulus, parentheses and scalar variables.

Inspirations
------------

[](#inspirations)

- [EOS](https://github.com/jlawrence11/eos) by jlawrence11
- [TextCalculate](https://github.com/bolstad/textcalculate) by bolstad

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance65

Regular maintenance activity

Popularity3

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 81.3% 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

298d ago

### Community

Maintainers

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

---

Top Contributors

[![mld](https://avatars.githubusercontent.com/u/701599?v=4)](https://github.com/mld "mld (13 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (3 commits)")

---

Tags

mathsolveequations

###  Code Quality

TestsPest

Static AnalysisRector

### Embed Badge

![Health badge](/badges/mld-simple-equation-solver/health.svg)

```
[![Health](https://phpackages.com/badges/mld-simple-equation-solver/health.svg)](https://phpackages.com/packages/mld-simple-equation-solver)
```

###  Alternatives

[brick/math

Arbitrary-precision arithmetic library

2.1k504.0M276](/packages/brick-math)[markrogoyski/math-php

Math Library for PHP. Features descriptive statistics and regressions; Continuous and discrete probability distributions; Linear algebra with matrices and vectors, Numerical analysis; special mathematical functions; Algebra

2.4k7.1M40](/packages/markrogoyski-math-php)[jlawrence/eos

Parse and solve math equations without using 'eval()'.

1071.1M11](/packages/jlawrence-eos)[phpseclib/bcmath_compat

PHP 5.x-8.x polyfill for bcmath extension

16720.7M17](/packages/phpseclib-bcmath-compat)[rubix/tensor

A library and extension that provides objects for scientific computing in PHP.

2751.4M5](/packages/rubix-tensor)[php-decimal/php-decimal

Correctly-rounded arbitrary precision decimal floating point

781.0M9](/packages/php-decimal-php-decimal)

PHPackages © 2026

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