use Safe; $compartment = new Safe('userMath'); $result = $compartment->reval($expressionToEval);