1. Go to this page and download the library: Download kennyth01/php-rules-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/ */
[
'type' => 'fouledOut',
'params' => [
'message' => 'Player has fouled out!'
],
'facts' => [
'personalFoulCount' => 6,
'gameDuration' => 40
],
'interpretation' => '((gameDuration is equal to 40 AND personalFoulCount is >= 5) OR (gameDuration is equal to 48 AND NOT (personalFoulCount is less than 6)))'
]
bash
composer
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.