sfneal / array-helpers
Array helpers for PHP applications
Installs: 116 704
Dependents: 4
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: >=7.1
- ext-gmp: *
- sfneal/actions: ^2.0
Requires (Dev)
- ext-json: *
- orchestra/testbench: >=3.8
- phpunit/phpunit: >=5.7.0
- scrutinizer/ocular: ^1.8
Suggests
- illuminate/collections: Improves array differential performance
README
Array helpers for PHP applications.
Installation
You can install the package via composer:
composer require sfneal/array-helpers
In order to autoload to the helper functions add the following path to the autoload.files section in your composer.json.
"autoload": { "files": [ "vendor/sfneal/array-helpers/src/arrays.php" ] },
Usage
Here's an example use of the arrayRemoveKeys method.
$array = ['red' => 36, 'black' => 88, 'white' => 72]; // Remove a key from the array use Sfneal\Helpers\Arrays\ArrayHelpers; (new ArrayHelpers($array))->arrayRemoveKeys('red'); >>> ['black' => 88, 'white' => 72,];
Testing
composer test
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email stephen.neal14@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
PHP Package Boilerplate
This package was generated using the PHP Package Boilerplate.