PHP code example of o-p / json-logic
1. Go to this page and download the library: Download o-p/json-logic 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/ */
o-p / json-logic example snippets
echo \JsonLogic\JsonLogic::apply($rule, $data);
$rule = \JsonLogic\JsonLogic::rule($rule);
var_dump(
array_filter($logs, function ($log) use ($rule) {
return $rule->process($log);
})
);