Update README.md

This commit is contained in:
Lico San
2019-06-17 13:35:07 +02:00
committed by GitHub
parent 1fbf15b190
commit 8ad7ac3a63
+12 -12
View File
@@ -13,23 +13,23 @@ Then you might like Formula1 ! ;-)
**Simple usage no variables** **Simple usage no variables**
> $f1 = new Formula1('-45+(41*2)-(6/(3+1))'); ```PHP
$f1 = new Formula1('-45+(41*2)-(6/(3+1))');
> echo($f1->compute()); // 35.5 echo($f1->compute()); // 35.5
```
**Simple usage with variables** **Simple usage with variables**
> $f1 = new Formula1('-45+(fourty_one*2)-(6/(three+1))' , ['fourty_one'=>41, 'three'=>3]); ```PHP
$f1 = new Formula1('-45+(fourty_one*2)-(6/(three+1))' , ['fourty_one'=>41, 'three'=>3]);
> echo($f1->compute()); echo($f1->compute());
```
**Funky usage with variables that include formulas themselves (and recusrively)** **Funky usage with variables that include formulas themselves (and recusrively)**
> $f1 = new Formula1('-45+(fourty_one*2)-(6/(three+1))' , ['fourty_one'=>'82/2', 'three'=>'12/four', 'four'=>4]); ```PHP
$f1 = new Formula1('-45+(fourty_one*2)-(6/(three+1))' , ['fourty_one'=>'82/2', 'three'=>'12/four', 'four'=>4]);
> echo($f1->compute()); echo($f1->compute());
```