jeroendn / php-helpers
包含一些类内有用函数的包。
v0.6-beta
2024-02-24 09:59 UTC
Requires
- php: ^8.1
- ext-curl: *
- symfony/var-dumper: ^6.3
Requires (Dev)
- phpunit/phpunit: ^9
This package is auto-updated.
Last update: 2024-09-11 16:49:59 UTC
README
包含一些类内有用函数的包。
安装
composer require jeroendn/php-helpers
如何使用
use jeroendn\PhpHelpers\Helper\ArrayHelper; $array = [ (new stdClass)->name = 'John', (new stdClass)->name = 'Hans', (new stdClass)->name = 'Piet', ] ArrayHelper::sortByProperty($array, 'name', true); echo $array[0]->name; // Hans
开发
运行测试
./vendor/bin/phpunit tests