PHP Classes

Expressions: Parse, convert and evaluate math expressions

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 379 All time: 6,740 This week: 455Up
Version License PHP version Categories
expressions 1.0.0BSD License5.0Algorithms, PHP 5, Math
Description 

Author

This package can parse, convert and evaluate math expressions.

There is a convertor class that can parse a string with a math expression with infix format (operators in the middle of the operands) to postfix format (operators after operands), as well to expression tree of objects.

An evaluator class can evaluate a math expression from a postfix string or expression or an expression tree of objects.

Currently the evaluation supports addition, subtraction, multiplication and division of integer operator numbers, as well parenthesis to group expressions to be evaluated first.

Picture of Alex Dan
Name: Alex Dan <contact>
Classes: 1 package by
Country: Romania Romania

 

  Files folder image Files (9)  
File Role Description
Files folder imageConfig (2 files)
Files folder imageLib (1 file, 1 directory)
Accessible without login Plain text file main.php Example Expression Example script

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:379
This week:0
All time:6,740
This week:455Up