Download the PHP package nancheng/pfinal-array without Composer

On this page you can find all versions of the php package nancheng/pfinal-array. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package pfinal-array

pfinal-array

Note:

这是一个PHP数组操作增强组件,对 PHP 数组的常用操作进行封装

目前包括以下方法:

函数名 函数描述
pf_del_val() 删除数组中的某个值
pf_key_exists() 判断数组中是否有这个键
pf_get() 根据键名获取数组中的某个值,支持点语法
pf_set() 设置数组元素值支持点语法
pf_arr_sort() 数组排序
pf_tree() 二级数组树结构化(不递归)
pf_get_tree() 多级数组结构化(不递归)
pf_array_unique() 多维数组去重
pf_array_depth() 检测数组的维度
pf_encode() 数据格式转换支持 数组转 'json','xml','csv','serialize'
pf_array_flatten() 将多维折叠数组变为一维
pf_is_list() 判断PHP数组是否索引数组
pf_array_rand_by_weight() 根据权重获取随机区间返回ID
pf_rand_val() 随机获取数组中的元素
pf_rand_weighted() 按权重 随机返回数组的值
pf_array_shuffle() 随机打乱数组(支持多维数组)
pf_array_insert() 在数组中的给定位置插入元素
pf_array_diff_both() 返回两个数组中不同的元素
pf_array_group_by() 按指定的键对数组依次分组
pf_array_null() 把数组中的null转换成空字符串
pf_count_element() 统计数组中元素出现的次数
pf_map() 重组数组
pf_exists() 判断数组中某个键有木有值
pf_arr_group_by() 按指定值给数组分组
pf_arr_sort_by_key() 按指定键给数组排序
pf_arr_remove_empty() 递归过滤多维数组中 空白字符,负值,false,null
pf_date_indexed() 生成一个日期数组
pf_date_assoc() 产生一个关联数组
pf_array_where() 使用给定闭包对数组进行过滤
pf_array_first() 获取数组的第一个元素
pf_array_last() 获取数组的最后一个元素

安装

通过 Composer 安装:


使用

例子

多维数组去重

获取指定列的数据

按指定的键对数组依次分组

组词算法

统计数组元素在数组中出现的次数

从多维数组或对象数组构建一个映射(键-值对)。

查看更多例子:更多

其他

继续完善


All versions of pfinal-array with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package nancheng/pfinal-array contains the following files

Loading the files please wait ....