PHP code example of linio / rule-engine

1. Go to this page and download the library: Download linio/rule-engine 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/ */

    

linio / rule-engine example snippets




use Linio\Type\Dictionary;
use Linio\Component\RuleEngine\Interpreter;

$context = new Dictionary(['item' => 11]);
$interpreter = new Interpreter();
$interpreter->setParser(...);
$interpreter->evaluate('rule source', $context);