NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist
Packagist, #2775 most downloaded on Packagist
Simple math expressions calculator
Latest stable
v2.4.0
Last release 2 months ago
23 Sep 2026
Release timing varies
gaps range from 2 weeks to 12 months
Some releases are documented
notes for 24 of 45 stable releases
Nothing withdrawn
no release was ever pulled
13 years old
45 releases · first in 2013
Drag across the ruler to compare, or tap a release to open it.
Invalid values in math operations could result in native PHP exceptions. MathExecutor exceptions are now thrown instead.
Invalid values in math operations could result in native PHP exceptions. MathExecutor exceptions are now thrown instead.
Big thanks to @javiermarinros for this release
Nothing published for this version
Nothing published for this version
Support for second argument to log() to match PHP log() function.
Support for second argument to log() to match PHP log() function.
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Nothing published for this version
Fixed PHP 8.2 depreciation (thanks @javiermarinros)
Added support for logical NOT(!) operator. Thanks to @fatihkizmaz
Minor formatting issues in code
Throw an IncorrectNumberOfFunctionParametersException if a function gets more arguments than it supports.
Throw an IncorrectNumberOfFunctionParametersException if a function gets more arguments than it supports.
Thanks to @madman-81
Thanks to @tobiashowitz for suggesting BCMath support
Thanks to @tobiashowitz for suggesting BCMath support
Space should end numbers and string and not concatenate
Strings with quotes can now be escaped in the same way as PHP.
Thanks to @fatihkizmaz Fatih Kızmaz for this release.
Full support for arrays in expressions ([3,7,13] or array(2,4,8))
Thanks to @fatihkizmaz Fatih Kızmaz for this release.
Thanks to @mrm Matthijs Meulenbrug for this release.
getVar now respects VarNotFoundHandler setting
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Ability not cache expression parsing and clear the cache.
Ability not cache expression parsing and clear the cache.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Undefined variable handler allows for delayed computation of variables. Perfect for seldom used variables that may be expensive to compute on initiali
Undefined variable handler allows for delayed computation of variables. Perfect for seldom used variables that may be expensive to compute on initialization of MathExecutor.
Nothing published for this version
Fixed variables and added better exception messages
Fixed variables and added better exception messages
MathExecutorException had incorrect namespace on setVar not being passed a numeric value.
MathExecutorException had incorrect namespace on setVar not being passed a numeric value.
Added Packagist badge to README.md
New tokenizer without regular expressions
Nothing published for this version
* Unary -0 support * PHP 7.4 support for TravisCI * Unit Test Cleanup * Documentation tweaks
Better support for (- construct
Better support for (- construct
Nothing published for this version
Nothing published for this version
Support for PHP 7.1 and higher. Will still work with 5.6 for now.
Support for PHP 7.1 and higher. Will still work with 5.6 for now.
## Recommended Upgrade * Better unary minus support * Updated unit tests * Updated docs
Nothing published for this version
Nothing published for this version
Allow for better customization when extending MathExecutor. Can be used to implement operator overloading for example. Updated documentation and added
Allow for better customization when extending MathExecutor. Can be used to implement operator overloading for example. Updated documentation and added a COC.
This is a recommended release. Prior versions may not work 100% with functions.
This is a recommended release. Prior versions may not work 100% with functions.
MathExecutor now allows for exceptions to be thrown on division be zero. Previous and current default behavior is it return 0 if dividing by zero.
MathExecutor now allows for exceptions to be thrown on division be zero. Previous and current default behavior is it return 0 if dividing by zero.
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per quarter.