A::nestByKeys()
Recursively creates a nested array from a set of keys with a key on each level; returns $value itself if $keys is empty
A::nestByKeys(mixed $value, list $keys)
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| $valuerequired | mixed |
no default value | Arbitrary value that will end up at the bottom of the tree |
| $keysrequired | list<array-key> |
no default value | List of keys to use sorted from the topmost level |