A utility to use dot notation in PHP arrays.
- Clone this repo.
- Copy
local.env.disttolocal.envand update github.com token as appropriate. - Run
make testto install dependencies and run PHPUnit tests.
There is a Makefile in place to simplify common tasks.
make test- doescomposer installand 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',
]