1. Go to this page and download the library: Download naotake51/evaluation 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/ */
naotake51 / evaluation example snippets
use Naotake51\Evaluation\Evaluation;
$evaluation = new Evaluation([
'square' => function (array $arguments) {
return $arguments[0] * $arguments[0];
}
]);
$result = $evaluation('square(2) + square(2)'); // => 8