Daniel Friesen wrote:
Oh, Expr.php is listed there, however I'm thinking
of doing something
else. Originally I hunted around for some C math parsers (ie: Something
you could input a formula into and get a returned result). However, now
I'm thinking of writing my own math engine, using the way the new
preprocessor works as an idea on how to do it. Hopefully this should
allow for a far more featured #expr tag.
Instead of writing a math parser in php, what about using php own
ability to cope with mathematical expressions via eval()?
It would obviously need strong checkings to avoid opening holes, but if
all the characters match [0-9]+-*/%() it should be safe to pass to the
php parser.