We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a58fe16 commit 8d3b419Copy full SHA for 8d3b419
README.md
@@ -1 +1,21 @@
1
# An unofficial PHP implementation of JsonLogic
2
+
3
+### Usage
4
5
+- For an one-time logic to data use case, the `apply` function is enough:
6
7
+ ```php
8
+ echo \JsonLogic\JsonLogic::apply($rule, $data);
9
+ ```
10
11
+- For a rule runs tons times, e.g. find matched records in daily logs:
12
13
14
+ $rule = \JsonLogic\JsonLogic::rule($rule);
15
16
+ var_dump(
17
+ array_filter($logs, function ($log) use ($rule) {
18
+ return $rule->process($log);
19
+ })
20
+ );
21
0 commit comments