Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class a
- {
- }
- class b
- {
- protected function __construct($x)
- {
- }
- }
- class c extends b
- {
- protected function __construct(a $x)
- {
- $this->t($x);
- }
- }
- //
- class a
- {
- }
- class b
- {
- static function t($x)
- {
- return new self($x);
- }
- }
- class c extends b
- {
- static function t(a $x) // Declaration of c::t() should be compatible with b::t($x)
- {
- return new self($x);
- }
- }
- //
- class a
- {
- }
- class b
- {
- protected function __construct($x)
- {
- }
- }
- class c extends b
- {
- public function __construct(a $x)
- {
- }
- }
- //
- class a
- {
- }
- class b
- {
- protected static function t($x)
- {
- return new self($x);
- }
- }
- class c extends b
- {
- public static function t($x)
- {
- return new self($x);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement