dcwq / array-helper
Array Helper
Installs: 17
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Language:Ruby
Requires
- php: >=5.6.0
Requires (Dev)
- phpunit/phpunit: 5.*
This package is not auto-updated.
Last update: 2025-02-19 05:54:11 UTC
README
Requirements
Requires PHP version 5.6+
Installation
This class can be used directly from a GIT clone:
git clone https://github.com/dcwq/array-helper.git
Composer Usage
After either installing Composer using one of the two methods shown at http://getcomposer.org the composer.json would look like:
require_once 'vendor/autoload.php';
Then you'll include the composer autoloader:
{ "require": { "dcwq/array-helper": "dev-master" } }
You can install this package via composer directly in CLI:
composer require dcwq/array-helper
Usage
User dcwq\ArrayHelper namespace:
ArrayHelper::flatten
Flatten array of integer numbers
use dcwq\ArrayHelper; $flattenArray = ArrayHelper::flatten([1, [2, [3], 4], 5], 1);
Testing
You can run the tests with:
vendor/bin/phpunit
License
The MIT License (MIT). Please see License File for more information.