jeroendn / php-helpers
A package containing some useful functions within classes.
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-04-24 10:28:38 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