iqomp / helper
全局辅助函数集合
0.0.1
2021-04-22 08:36 UTC
Requires (Dev)
This package is auto-updated.
Last update: 2024-09-22 16:02:00 UTC
README
全局辅助函数集合。
安装
composer require iqomp/helper
函数
alt(...$args)
从多个选项中获取真正值
deb(...$args): void
用于调试目的打印变量
group_by_prop(array $array, string $prop): array
按对象的属性对对象列表进行分组
hs(string $str): string
htmlspeciachars的简写
is_indexed_array(array $array): bool
检查数组是否为索引数组
object_replace(object $origin, object $new): object
将对象的旧属性替换为新属性
objectify($arr)
将数组值转换为对象
prop_as_key(array $array, string $prop): array
使用数组对象的属性作为数组键
to_slug(string $str): string
将标准字符串转换为slug风格