eshumeyko / strcalc
String calculator
v0.5
2019-10-07 15:02 UTC
Requires
- php: ^7.1.3
This package is not auto-updated.
Last update: 2026-03-17 21:38:44 UTC
README
String Calculator Symfony4 Bundle
Install
- install symfony4 https://symfony.com/doc/current/setup
- install strcalc via composer
$ composer require eshumeyko/strcalc
Usage
...
use eshumeyko\StrcalcBundle\Calculator;
...
$infix = "1 + 2 / 4 - 9 * (1 - 7/3.5)^2";
$calculator = new Calculator();
$result = $calculator->calc($infix);
// -7.5
...