weew/helpers-array
Composer 安装命令:
composer require weew/helpers-array
包简介
Useful collection of php array helpers.
README 文档
README
Table of contents
Installation
composer require weew/helpers-array
Introduction
This tiny library provides various helper functions to deal with arrays.
Functions
array_get
Get an item from an array using "dot" notation.
mixed array_get(array $array, mixed $key [, mixed $default = null])
array_has
Check if an item exists in an array using "dot" notation.
bool array_has(array $array, mixed $key)
array_set
Set an array item to a given value using "dot" notation.
array array_set(array &$array, mixed $key, mixed $value)
array_remove
Remove one or many array items from a given array using "dot" notation.
void array_remove(array &$array, mixed $keys)
array_add
Add an element to the array at a specific location using the "dot" notation.
array array_add(array &$array, mixed $key, mixed $value)
array_take
Get an element and remove it from the array using the "dot" notation.
array array_take(array &$array, mixed $key, [, mixed $default = null])
array_first
Get the first element from an array.
array array_first(array &$array, [, mixed $default = null])
array_last
Get the last element from an array.
array array_last(array &$array, [, mixed $default = null])
array_reset
Reset all numerical indexes of an array (start from zero). Non-numerical indexes will stay untouched.
array array_reset(array $array [, bool $deep = false])
array_dot
Flatten a multi-dimensional associative array with dots.
array array_dot(array $array [, string $prepend = ''])
array_extend
Extend one array with another.
array array_extend(array $arrays [, array $...])
array_extend_distinct
Extend one array with another. Non associative arrays will not be merged but rather replaced.
array array_extend_distinct(array $arrays [, array $...])
array_is_associative
Check if the given array is associative.
bool array_is_associative(array $array)
array_is_indexed
Check if an array has a numeric index.
bool array_is_indexed(array $array)
array_contains
Check if array contains a specific element.
array array_contains(array $array, mixed $search [, bool $strict = true])
weew/helpers-array 适用场景与选型建议
weew/helpers-array 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 10.24M 次下载、GitHub Stars 达 7, 最近一次更新时间为 2016 年 07 月 16 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 weew/helpers-array 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 weew/helpers-array 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 10.24M
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 8
- 点击次数: 15
- 依赖项目数: 21
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-07-16