Diff ​
- Type
- Class
- Namespace
- craft\helpers
- Inherits
- craft\helpers\Diff
- Since
- 3.6.0
Diff helper
Public Methods ​
| Method | Description |
|---|---|
| compare() | Compares two arrays and returns whether they are identical. |
| diff() | Generates a diff for two values, represented as YAML. |
compare() ​
- Since
- 3.6.0
Compares two arrays and returns whether they are identical.
If the values are both arrays, they will be compared recursively.
Arguments ​
$a(mixed)$b(mixed)$strict(boolean) – Whether strict comparisons should be used
Returns ​
diff() ​
Generates a diff for two values, represented as YAML.
Arguments ​
$from(mixed)$to(mixed)$indent(integer) – The indent size that nested values should have$contextLines(integer) – The number of lines to show before and after changes