Skip to content

Commit a023a94

Browse files
authored
Update README.md
1 parent b9c4c4a commit a023a94

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,21 @@ This library works best with one of these bundles below, but they're not require
3838

3939
## Usage Examples
4040

41+
Test if a value is in a given array
4142
```php
4243
$variables = ['foo' => 6];
4344

4445
$rule = new Rule('foo in [4, 6, 7]', $variables);
4546
var_dump($rule->isTrue()); // bool(true)
4647
```
4748

49+
Simple array manipulation
4850
```php
49-
$rule = new Rule('[1, 4, 3].join("") === "143"');
51+
$rule = new Rule('[1, 4, 3].join(".") === "1.4.3"');
5052
var_dump($rule->isTrue()); // bool(true)
5153
```
5254

55+
Test if a value is between a given range
5356
```php
5457
$variables = ['threshold' => 80];
5558

0 commit comments

Comments
 (0)