Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/darkfriend/php7-array
https://github.com/darkfriend/php7-array
array array-helper helper php php7
Last synced: 22 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/darkfriend/php7-array
- Owner: darkfriend
- Created: 2019-12-21T12:22:25.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-04-21T18:13:44.000Z (over 3 years ago)
- Last Synced: 2024-12-06T14:42:17.438Z (about 1 month ago)
- Topics: array, array-helper, helper, php, php7
- Language: PHP
- Size: 2.93 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ArrayHelper - хелпер для удобной работы с массивами
``composer require darkfriend/php7-array``
* ``ArrayHelper::in_array($needle, $haystack)`` - highload method for search value in array
* ``ArrayHelper::isMulti($arr)`` - check array on multiple array
* `` ArrayHelper::sortValuesToArray($sourceArray,$orderArray)`` - Sort values array to order array
* `` ArrayHelper::sortKeysToArray($sourceArray,$orderArray)`` - Sort keys source array to order array
* `` ArrayHelper::keysExists(array $arKeys, array $sourceArray)`` - found keys in source array
* `` ArrayHelper::removeByKey(array $source, array $keys, bool $negative = false)`` - remove keys from source array. If set negative in true then remove all except for keys
* `` ArrayHelper::removeByValue(array $source, array $values, bool $negative = false)`` - found values and remove item from source array. If set negative in true then remove all except for values
* `` ArrayHelper::mergeValues(array $array1, array $array2, array $keys = [])`` - merge values $array2 in $array1 at null or empty values $array1