Generic Types
note
Please note that throughout the documentation the term " template argument " is used because the similar term " template parameter " is used to describe a declaration.
If the PHP language supported generic types, then the declaration (in pseudo-language) of the type:
interface Traversable<node of array-key, TValue of mixed>
would contain parametersand the reference to the type:
Traversable<int<0, max>, string>
would contain arguments.
tip
Reference to an existing class, interface or enum with template arguments.
Path\To\ExampleClass<T, U>
tip
Reference to builtin type with template arguments containing other generics.
iterable<int<0, max>, Collection<User>>
tip
Trailing comma is allowed.
HashMap<Request, User,>