PHP code example of timo-lehnertz / formula
1. Go to this page and download the library: Download timo-lehnertz/formula library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
timo-lehnertz / formula example snippets
$formula = new Formula("10*a+func(b,5)");
$formula->setVariable("a", 1);
$formula->setVariable("b", 2);
$formula->setMethod("max", [$this, "func"]);
$result = formula->calculate();
a ? b : c