An open API service indexing awesome lists of open source software.

https://github.com/aboyadzhiev/php-math-parser

Simple mathematical expression parser and calculator.
https://github.com/aboyadzhiev/php-math-parser

calculator math mathematical-expression-parser php

Last synced: 6 months ago
JSON representation

Simple mathematical expression parser and calculator.

Awesome Lists containing this project

README

          

# Math

Simple mathematical expression parser and calculator.

## Install
The recommended way to install Math is [through composer](http://getcomposer.org).

```JSON
{
"require": {
"aboyadzhiev/php-math-parser": "dev-master"
}
}
```
## Usage

Here is simple example of evaluating math expression
```php
evaluate($expression);

echo $result; // 302

$expression = '-2+-2*13*(7*8)-(415-0.1)';
$result = $parser->evaluate($expression);

echo $result; // -1872.90

```
## TODO
- Add additional translation strategy

## License

MIT, see LICENSE.