A utility to use dot notation in PHP arrays.
- Clone this repo.
- Copy
local.env.dist
tolocal.env
and update GitHub.com token as appropriate. - Run
make test
to install dependencies and run PHPUnit tests.
There is a Makefile in place to simplify common tasks.
make test
- doescomposer install
and runs phpunit tests
Util class containing a single method to collapse a multi-dimensional array into a single-dimensional array. Array keys are combined using a dot to separate levels of the array. For instance:
[
'a' => [
'x' => 'data1',
],
'b' => 'data2',
]
will be collapsed to
[
'a.x' => 'data1',
'b' => 'data2',
]