dev-master
9999999-devSimple mathematical expression parser and calculator.
MIT
The Requires
- php >=5.3.0
The Development Requires
by Adrean Boyadzhiev
math parser shunting-yard algorithm math calculator
Simple mathematical expression parser and calculator.
Simple mathematical expression parser and calculator., (*1)
The recommended way to install Math is through composer., (*2)
{ "require": { "aboyadzhiev/php-math-parser": "dev-master" } }
Here is simple example of evaluating math expression, (*3)
<?php $parser = new \Math\Parser(); $expression = '1 + 2 * 3 * ( 7 * 8 ) - ( 45 - 10 )'; $result = $parser->evaluate($expression); echo $result; // 302 $expression = '-2+-2*13*(7*8)-(415-0.1)'; $result = $parser->evaluate($expression); echo $result; // -1872.90
MIT, see LICENSE., (*4)
Simple mathematical expression parser and calculator.
MIT
math parser shunting-yard algorithm math calculator