aikyuichi/formula-xy

Formula evaluator

Maintainers

Package info

github.com/Aikyuichi/formula-xy.php

pkg:composer/aikyuichi/formula-xy

Statistics

Installs: 8

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

0.7.0 2025-07-28 17:59 UTC

This package is auto-updated.

Last update: 2026-03-28 19:28:02 UTC


README

Static Badge Packagist Version Packagist License

Formula evaluator

Usage

require_once(__DIR__ . '/vendor/autoload.php');

try {
    $formula = new Aikyuichi\FormulaXY\Formula('{x}-{y}*5');
    $formula->setVariables([
        '{x}' => 10,
        '{y}' => 5,
    ]);
    print($formula->getResult());
} catch (\Exception $ex) {
    print($ex);
}

Author

Aikyuichi, aikyu.sama@gmail.com

License

FormulaXY is available under the MIT license. See the LICENSE file for more info.