xtompie / collection
Array wrapper
1.0
2024-05-24 19:43 UTC
Requires (Dev)
- phpunit/phpunit: ^10.5
This package is auto-updated.
Last update: 2025-04-24 21:35:50 UTC
README
Wrapper for array
Requiments
PHP >= 8.0
Installation
Using composer
composer require xtompie/collection
Docs
<?php echo Collection::of(['Alice', 'bob', 'Charlie', null]) ->filter(function (?string $name) { return $name !== null; }) ->map(function (string $name) { return ucfirst($name); }) ->implode(', ') ;
Check source: Collection