SimpleCalc is a project mainly written in PHP, it's free.
PHP Class to calculate simple mathematical expressions in infix notation
Copyright (C) 2011 Vladimir Shugaev
Class executes simple mathematical calculations with expression in infix notation Curently allows simple algebraic binary operations:
It also allows to use braces and watchs for priority of operations
require_once "class.SimpleCalc.php";
$calc=new SimpleCalc();
echo $calc->calculate ('3+2-1/3^2-15*1+(2+3-(3*2)^2)');