phore/core
最新稳定版本:1.2.2
Composer 安装命令:
composer require phore/core
包简介
Phore core library
README 文档
README
Install
composer requre phore/core
Basic usage
Pluck
$data = ["some"=>["path"=>"data"]]; assert( "data" === phore_pluck("some.path", $data) ); assert( "data" === phore_pluck(["some", "path"], $data) ); assert( "fail" === phore_pluck("unknown", $data, "fail") ); phore_pluck("unknown", $data, new InvalidArgumentException("path missing")); // if default is array, phore_pluck will ensure to return array assert ( [] == phore_pluck("some.path", $data, []) );
Transform Array
$input = ["a", "remove"]; $out = phore_array_transform($input, function ($key, $value) { if ($key == "remove") return null; return ["x"=>"y"]; }); assert([["x"=>"y"]] == $out);
Text functions
phore_text_unindent(string $input)
phore_random_str()
Wrapper around libsodium and
统计信息
- 总下载量: 13.75k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 26
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-09-05