neubert / pile
A small helper for fetching multidimensional arrays and objects.
Installs: 35
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/neubert/pile
Requires
- php: ^7.1
Requires (Dev)
- phpunit/phpunit: ^8
This package is auto-updated.
Last update: 2021-05-26 11:18:57 UTC
README
A small helper for fetching multidimensional arrays and objects.
Pile for PHP can return a value of a multidimensional array or object (or mixed). When the searched value can not be found (due to not existing keys for example) Pile will return null.
Installation
Composer
The preffered way getting Pile is requireing it via composer:
composer require neubert/pile
Download
If you'd like to download Pile to your project you can click here:
Example
<?php use Neubert\Pile; // sample array $foo = (object) [ 'key-1' => [ 'key-2' => [ 'key-3' => 'bar' ] ] ]; // echos 'bar' echo Pile::find($foo, 'key-1', 'key-2', 'key-3');
License
Pile is released under the MIT License. See the bundled LICENSE file for details.