PHPackages                             rossonero585/php-expression - 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. rossonero585/php-expression

ActiveLibrary

rossonero585/php-expression
===========================

Simple library for calculating math expressions

v2.0.1(3y ago)07MITPHPPHP &gt;=7.2

Since Dec 6Pushed 3y ago1 watchersCompare

[ Source](https://github.com/Rossonero585/php-expression)[ Packagist](https://packagist.org/packages/rossonero585/php-expression)[ RSS](/packages/rossonero585-php-expression/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (3)Dependencies (2)Versions (4)Used By (0)

### Description

[](#description)

This library allows creating math expression using numbers, brackets, mathematical signs (+,-,\*,/) and then execute them with different arguments. It also allows adding custom functions to be executed inside expression. It works trough `eval` function that receives dynamically generated string and then run it.

### Example usage

[](#example-usage)

#### Simple expression

[](#simple-expression)

```
