iqomp/helper

全局辅助函数集合

维护者

详细信息

github.com/iqomp/helper

源代码

问题

安装: 8

依赖: 0

建议者: 0

安全: 0

星标: 0

关注者: 2

分支: 0

开放问题: 0

类型:辅助工具

0.0.1 2021-04-22 08:36 UTC

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风格