Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class AAA{}
- class BBB extends AAA{}
- class X<T is AAA>{
- protected T $foo;
- function __construct(T $foo){
- $this->foo = $foo;
- }
- function set(T $foo){
- $this->foo = $foo;
- }
- }
- class Y<T is BBB> extends X<T>{
- function __construct(T $foo){
- parent::__construct($foo);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement