Beispiel #1
0
 /**
  * @return mixed
  */
 public function start()
 {
     // Input
     echo 'Formel: ';
     $formula = trim(fgets(STDIN));
     // Processing
     $formulaObj = $this->parser->parse($formula);
     $result = $this->calculator->calculate($formulaObj);
     // Output
     echo 'Ergebnis: ';
     echo $result;
     echo "\n";
 }