> Still no support for generics, unfortunately Huh? PHP is a dynamic language, you already have them in principle. Usually you can just have no type and use instanceof, but also requiring the parameter to be an interface does the job in most cases if you need more clarity. Edit: There's also method_exists! Also a whole heap of other tools in the toolbox https://www.php.net/manual/en/ref.classobj.php
For example I might say that a function takes a parameter of type "Traversable", but there's nothing stopping me manipulating that object and turning it into a "Traversable" because of that same dynamism.
It might be possible in the future to introduce reified generics which could be guaranteed by the engine, though that may end up being too difficult to add and maintain. In the meantime static analysis tools (like Psalm, which I created) are able to model operations using generics described in docblocks, which works pretty well.