mld / simple-equation-solver
Parse and solve simple math equations without using 'eval()'. Heavily inspired by the 'jlawrence/eos' library by Jon Lawrence.
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/mld/simple-equation-solver
Requires
- php: ^5.6 || ^7.4 || ^8.4
Requires (Dev)
- pestphp/pest: ^3.8
- rector/rector: ^2.1
This package is auto-updated.
Last update: 2025-12-30 16:42:05 UTC
README
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
- EOS by jlawrence11
- TextCalculate by bolstad