darkfriend / php5-array
PHP5 array helper
Installs: 2 327
Dependents: 2
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: >=5.4
README
composer require darkfriend/php5-array
ArrayHelper::in_array($needle, $haystack)
- highload method for search value in arrayArrayHelper::isMulti($arr)
- check array on multiple arrayArrayHelper::sortValuesToArray($sourceArray,$orderArray)
- Sort values array to order arrayArrayHelper::sortKeysToArray($sourceArray,$orderArray)
- Sort keys source array to order arrayArrayHelper::keysExists($arKeys, $sourceArray)
- found keys in source arrayArrayHelper::removeByKey(array $source, array $keys, bool $negative = false)
- remove keys from source array. If set negative in true then remove all except for keysArrayHelper::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 valuesArrayHelper::mergeValues(array $array1, array $array2, array $keys = [])
- merge values $array2 in $array1 at null or empty values $array1