PHP Classes

Expressions: Parse, convert and evaluate math expressions

Recommend this page to a friend!
  Info   View files View files (9)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 379 This week: 1All time: 6,737 This week: 560Up
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
Age: ???
All time rank: 360570 in Romania Romania
Week rank: 411 Up12 in Romania Romania Up

  Files folder image Files  
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

  Files folder image Files  /  Config  
File Role Description
  Accessible without login Plain text file config.php Conf. Expression Example config file
  Accessible without login Plain text file load.php Aux. Expression Example autoload file

  Files folder image Files  /  Lib  
File Role Description
Files folder imageExpression (5 files)
  Accessible without login Plain text file functions.php Aux. Expression Example functions file

  Files folder image Files  /  Lib  /  Expression  
File Role Description
  Plain text file Convertor.php Class Expression Example Convertor class
  Plain text file Evaluator.php Class Expression Example Evaluator class
  Plain text file Exception.php Class Expression Example Exception class
  Plain text file Tree.php Class Expression Example Tree class
  Plain text file TreeNode.php Class Expression Example TreeNode class

 Version Control Unique User Downloads Download Rankings  
 0%
Total:379
This week:1
All time:6,737
This week:560Up