jeroendn / php-helpers
A package containing some useful functions within classes.
0.7-beta
2024-12-21 11:55 UTC
Requires
- php: ^8.2
- ext-curl: *
- symfony/var-dumper: *
Requires (Dev)
- phpunit/phpunit: ^9
This package is auto-updated.
Last update: 2024-12-21 12:11:59 UTC
README
A package containing some useful functions within classes.
Installation
composer require jeroendn/php-helpers
How to use
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
Development
Run tests
./vendor/bin/phpunit tests