PHP Classes

Eval Math: Safely evaluate mathematical expressions

Recommend this page to a friend!
  Info   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum (12)   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStarStar 64%Total: 4,954 This week: 2All time: 543 This week: 96Up
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
Age: 36
All time rank: 59378 in United States United States
Week rank: 106 Up12 in United States United States Up

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

 Version Control Reuses Unique User Downloads Download Rankings  
 0%1
Total:4,954
This week:2
All time:543
This week:96Up
User Ratings User Comments (4)
 All time
Utility:93%StarStarStarStarStar
Consistency:88%StarStarStarStarStar
Documentation:-
Examples:90%StarStarStarStarStar
Tests:-
Videos:-
Overall:64%StarStarStarStar
Rank:692
 
Undefined offset: -1 Does not work with func with '('
10 years ago (Sasha)
30%StarStar
Awesome!
11 years ago (James H.)
67%StarStarStarStar
It can't handle expression without errors, if whole expressio...
11 years ago (Fitrah Muhammad)
65%StarStarStarStar
Excellent
14 years ago (kishore kumar)
70%StarStarStarStar