PHPackages                             stratadox/php-generics - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. stratadox/php-generics

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

stratadox/php-generics
======================

v0.1(6y ago)23MITPHPPHP &gt;=7.2CI failing

Since Mar 4Pushed 6y ago1 watchersCompare

[ Source](https://github.com/Stratadox/PhpGenerics)[ Packagist](https://packagist.org/packages/stratadox/php-generics)[ RSS](/packages/stratadox-php-generics/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependencies (8)Versions (2)Used By (0)

Generics in PHP
===============

[](#generics-in-php)

[![Build Status](https://camo.githubusercontent.com/5bbe440ec88b4d0a5faacd543e3450865b25ff8100ebf85fbca3c033d22f98d1/68747470733a2f2f7472617669732d63692e6f72672f537472617461646f782f50687047656e65726963732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Stratadox/PhpGenerics)[![Coverage Status](https://camo.githubusercontent.com/dc7c30a5aef5cc0db27498634ed7103e188bc116f63ad011c71e01154829d501/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f537472617461646f782f50687047656e65726963732f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/Stratadox/PhpGenerics?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/41f714ddb698b91e023cf3af0717faeb762acd3ed6cada0b41a7247c4d55fbf0/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f537472617461646f782f50687047656e65726963732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Stratadox/PhpGenerics/?branch=master)

Albeit with some limitations and caveats, this library unlocks the power of generics for the PHP language.

Installation
------------

[](#installation)

Install with `composer require stratadox/php-generics`

Usage
-----

[](#usage)

First install the autoloader, using:

```
