Description:
------------
Add generics support to PHP. So you can declare classes like this:
class MyGenericClass<T> {
private $object;
public function __construct() {
$this->object = new T();
}
}
or
class MyGenericClass<T extends SuperTClass> {
private $object;
public function __construct() {
$this->object = new T();
}
}
In the first case you can make a new (supposing that there is defined a B
class):
$a = new MyGenericClass<B>();
and in the second example you are forcing B to be a SuperTClass.
I hope you can implement this feature! Is great!!!
Expected result:
----------------
Generics included in a PHP relase.
Actual result:
--------------
No Generics support.