Download the PHP package kusabi/arrays without Composer
On this page you can find all versions of the php package kusabi/arrays. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download kusabi/arrays
More information about kusabi/arrays
Files in kusabi/arrays
Informations about the package arrays
Extensions to PHP native arrays
A library that extends PHP's native array functionality
Compatibility and dependencies
This library is compatible with PHP version 7.2
, 7.3
, 7.4
, 8.0
, 8.1
, 8.2
, 8.3
and 8.4
This library has no dependencies.
Installation
Installation is simple using composer.
Or simply add it to your composer.json
file
Contributing
This library follows PSR-1 & PSR-2 standards.
Unit Tests
Before pushing any changes, please ensure the unit tests are all passing.
If possible, feel free to improve coverage in a separate commit.
Code sniffer
Before pushing, please ensure you have run the code sniffer. Only run it using the lowest support PHP version (7.2)
Static Analyses
Before pushing, please ensure you have run the static analyses tool.
Benchmarks
Before pushing, please ensure you have checked the benchmarks and ensured that your code has not introduced any slowdowns.
Feel free to speed up existing code, in a separate commit.
Feel free to add more benchmarks for greater coverage, in a separate commit.
Documentation
This library adds a number of array functions to extend PHP's native functionality
Below you can find links to the documentation for the new features.
Function | Description |
---|---|
array_at | Get the nth value from an array |
array_deflate | Flattens a nested array into a single level array |
array_except | Return a subset of the array by passing in an array of keys to discard |
array_exists | Checks if the given key or index exists in the array using dot notation for nested arrays |
array_first | Get the first item from the array |
array_from | Attempt to convert an input into an array |
array_from_query | Convert a URL query string to an array |
array_get | Returns a value from the array, using dot notation for nested sets |
array_inflate | Expands a flattened array back into a nested array |
array_is_list | Checks whether a given array is a list |
array_join | Joins entries of array into a string using optional glue substring and optional final glue substring |
array_key_at | Get the nth key from an array |
array_last | Get the last entry in the array |
array_only | Return a subset of the array by passing in an array of keys to keep |
array_pull | Return and remove a key in the array using dot notation for nested arrays |
array_random | Picks one or more random entries out of an array, and returns the value (or values) of the random entries |
array_set | Set a key in the array using dot notation for nested arrays |
array_to_query | Convert an array to a URL query string |
array_unset | Remove a key in the array using dot notation for nested arrays |
All versions of arrays with dependencies
ext-json Version *