PHP Classes

Eval Math: Safely evaluate mathematical 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
StarStarStarStar 64%Total: 4,964 All time: 542 This week: 53Up
Version License Categories
evalmath 1.0.0BSD LicenseMath
Description 

Author

This class can be used to safely evaluate mathematical expressions.

The class can take an expression in a text string and evaluate it by replacing values of variables and calculating the results of mathematical functions and operations.

It supports implicit multiplication, multivariable functions and nested functions.

It can be used to evaluate expressions from untrusted sources. It provides robust error checking and only evaluates a limited set of functions.

It could be used to generate graphs from expressions of formulae.

Picture of Miles Kaufmann
Name: Miles Kaufmann <contact>
Classes: 1 package by
Country: United States United States

  Files folder image Files (3)  
File Role Description
Plain text file evalmath.class.php Class The EvalMath class
Accessible without login HTML file example.html Output Output from example.php
Accessible without login Plain text file example.php Example Generates a table from user input

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 Reuses Unique User Downloads Download Rankings  
 0%1
Total:4,964
This week:0
All time:542
This week:53Up
User Ratings User Comments (4)
 All time
Utility:93%StarStarStarStarStar
Consistency:88%StarStarStarStarStar
Documentation:-
Examples:90%StarStarStarStarStar
Tests:-
Videos:-
Overall:64%StarStarStarStar
Rank:701
 
Undefined offset: -1 Does not work with func with '('
11 years ago (Sasha)
30%StarStar
Awesome!
12 years ago (James H.)
67%StarStarStarStar
It can't handle expression without errors, if whole expressio...
12 years ago (Fitrah Muhammad)
65%StarStarStarStar
Excellent
15 years ago (kishore kumar)
70%StarStarStarStar