首页 / PHP / PHP便捷开发工具集合
PHP便捷开发工具集合
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了PHP便捷开发工具集合,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含2999字,纯文字阅读大概需要5分钟。
内容图文
![PHP便捷开发工具集合](/upload/InfoBanner/zyjiaocheng/203/09fbea83065b452ebd4eb0448004af0e.jpg)
Belt 主要特性:
-
60+ 的有用函数
-
经过完整的测试
-
代码清晰明了,文档齐全
Belt 包括:
-
boolean isDate(mixed $value)
-
boolean isNumber(mixed $value)
-
boolean isString(mixed $value)
-
boolean isFunction(mixed $value)
-
boolean isEmpty(mixed $value)
-
boolean isEqual(mixed $left, mixed $right)
-
boolean isBoolean(mixed $value)
-
boolean isObject(mixed $value)
-
boolean isArray(mixed $value)
-
boolean isTraversable(mixed $value)
-
boolean isNull(mixed $value)
-
boolean has(mixed $object, string $key)
-
array keys(mixed $object)
-
array values(mixed $object)
-
array methods(mixed $object)
-
mixed copy(mixed $value)
-
mixed extend(mixed $source, mixed $destination)
-
mixed apply(mixed $object, Closure $closure)
-
mixed defaults(mixed $object, array|mixed $defaults)
-
string escape(string $string)
-
string id(string $prefix = '')
-
mixed with(mixed $value)
-
void times(integer $number, Closure $closure)
-
mixed cache(Closure $closure)
-
mixed wrap(Closure $closure, Closure $wrapper)
-
mixed compose(array $closures, array $arguments = array())
-
void once(Closure $closure)
-
mixed after(integer $number, Closure $closure)
-
mixed|array first(array $elements, integer $amount = 1)
-
array initial(array $elements, integer $amount = 1)
-
array rest(array $elements, integer $index = 1)
-
mixed|array last(array $elements, integer $amount = 1)
-
array pack(array $elements)
-
array flatten(array $elements)
-
array range(integer $to, integer $from = 0, integer $step = 1)
-
array difference(array $one, array $another)
-
array unique(array $elements, Closure $iterator = null)
-
array without(array $elements, array $ignore)
-
array zip(array $one, array $another)
-
integer indexOf(array $elements, mixed $element)
-
array intersection(array $one, array $another)
-
array union(array $one, array $another)
-
void each(array $collection, Closure $iterator)
-
array map(array $collection, Closure $iterator)
-
array toArray(mixed $value)
-
integer|null size(array|Countable $value)
-
array shuffle(array $collection)
-
boolean any(array $collection, Closure $iterator)
-
boolean all(array $collection, Closure $iterator)
-
array reject(array $collection, Closure $iterator)
-
array pluck(array $collection, string $key)
-
boolean contains(array $collection, mixed $value)
-
array invoke(array $collection, string $function)
-
mixed reduce(array $collection, Closure $iterator, mixed $initial = 0)
-
array sortBy(array $collection, Closure $iterator)
-
array groupBy(array $collection, Closure $iterator)
-
mixed max(array $collection)
-
mixed min(array $collection)
简单示例:
use Belt\Belt;Belt::max([1, 2, 3]) // => 3Belt::flatten([1, [2, [3]]]) // => [1, 2, 3]Belt::last([1, 2, 3], 2) // => [2, 3]
项目主页:http://www.open-open.com/lib/view/home/1430832041179
内容总结
以上是互联网集市为您收集整理的PHP便捷开发工具集合全部内容,希望文章能够帮你解决PHP便捷开发工具集合所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。