chriskonnertz/string-calc
StringCalc is a lightweight PHP library that evaluates mathematical expressions passed as strings, turning terms like 1+1 or sqrt(16)*2 into results. It supports basic operators, brackets, and common functions, with no dependencies—ideal for calculators and formula inputs.
StringCalc is a lightweight PHP library that evaluates mathematical expressions written as strings—ideal when formulas originate from user input, configuration files, or database records. It parses terms with correct operator precedence and returns the computed value, sparing you from writing and maintaining a custom parser.
Features
How can I help you explore Laravel packages today?