From 8ad7ac3a63edc447d1295d88ccda0eb1c563a2e0 Mon Sep 17 00:00:00 2001 From: Lico San Date: Mon, 17 Jun 2019 13:35:07 +0200 Subject: [PATCH] Update README.md --- README.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 1e4c569..689fff1 100644 --- a/README.md +++ b/README.md @@ -13,23 +13,23 @@ Then you might like Formula1 ! ;-) **Simple usage no variables** -> $f1 = new Formula1('-45+(41*2)-(6/(3+1))'); - -> echo($f1->compute()); // 35.5 - +```PHP +$f1 = new Formula1('-45+(41*2)-(6/(3+1))'); +echo($f1->compute()); // 35.5 +``` **Simple usage with variables** -> $f1 = new Formula1('-45+(fourty_one*2)-(6/(three+1))' , ['fourty_one'=>41, 'three'=>3]); - -> echo($f1->compute()); - +```PHP +$f1 = new Formula1('-45+(fourty_one*2)-(6/(three+1))' , ['fourty_one'=>41, 'three'=>3]); +echo($f1->compute()); +``` **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]); - -> echo($f1->compute()); - +```PHP +$f1 = new Formula1('-45+(fourty_one*2)-(6/(three+1))' , ['fourty_one'=>'82/2', 'three'=>'12/four', 'four'=>4]); +echo($f1->compute()); +```