Swift package providing commonly used data structures such as deques, heaps, ordered sets and dictionaries, and bit sets for Swift developers.
ramsey/collection
A PHP library for representing and manipulating collections, with typed collection and map classes inspired by the Java Collections Framework.
- Stars
- 1,203
- Forks
- 54
- Open issues
- 7
- Last commit
- 3 months ago
What is it?
ramsey/collection is a PHP library for representing and manipulating collections of values. It provides object-oriented collection types so PHP code can work with groups of items through a consistent interface rather than raw arrays.
The library draws its design from the Java Collections Framework, so developers familiar with that model will find similar concepts for lists, sets, queues and maps. It is installed through Composer, and usage examples are kept on the project's wiki.
The package is MIT licensed and targets modern PHP versions, with the README noting PHP 8 support through its topic tags and CI setup.
Key features
- 01Object-oriented collection types for working with groups of values in PHP.
- 02Design modeled on the Java Collections Framework.
- 03Installable via Composer as a standard PHP dependency.
- 04Usage examples are documented on the project wiki.
Use cases
- Replacing ad hoc PHP arrays with typed collection objects in an application.
- Building queues, sets or maps with a consistent PHP interface.
- Adding a collection abstraction to a PHP library or framework.
Quick start
- 1
Install the package with Composer
composer require ramsey/collection
Topics
FAQ
- What is collection?
- A PHP library for representing and manipulating collections, with typed collection and map classes inspired by the Java Collections Framework. ramsey/collection is a PHP library for representing and manipulating collections of values. It provides object-oriented collection types so PHP code can work with groups of items through a consistent interface rather than raw arrays.
- Is collection free to use? What license does it have?
- collection is open source under the MIT license. Check the license terms before using it in commercial products.
- Is collection still maintained?
- Updated within 6 months. The last commit to collection was on Aug 17, 2026.
- What can I use collection for?
- Replacing ad hoc PHP arrays with typed collection objects in an application. Building queues, sets or maps with a consistent PHP interface. Adding a collection abstraction to a PHP library or framework.
- How do I install collection?
- Install the package with Composer: composer require ramsey/collection
- Where can I get collection?
- The source code and installation instructions are on GitHub: https://github.com/ramsey/collection
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A PHP library for generating and working with universally unique identifiers (UUIDs).
A C library for extremely fast non-cryptographic hashing, producing identical 32, 64 and 128-bit hashes across platforms.
A light, fast, flexible PHP full-stack web framework, the 4th major version of CodeIgniter, rewritten for modern PHP.
A PSR-compatible PHP full-stack framework for long-running apps, built on the RoadRunner application server.
A Laravel package that lets you register routes by placing PHP 8 attributes directly on controller classes and methods.