I'm currently working on a PHP application that needs to solve equations that may, or may not, have a ternary operator.
For example, after replacing my variables in the equation, we are left with the following string:
$eq = '(3.07 > 10 ? 1.93 * 10 : 3.07 * 1.93)';
We were previously using eval() (which would obviously work), but moved to an EOS package from PHP Classes (https://www.phpclasses.org/package/2055-PHP-Solve-equations-with-multiple-variables.html) because of the security issues with eval().
The EOS class doesn't interpret the ternary operator, and I don't want to go back to eval(), so what are my options here? Is there a better PHP EOS library that I can use somewhere?