1--TEST-- 2Internal covariant return type of self 3--FILE-- 4<?php 5class Foo { 6 public static function test() : self { 7 return new Foo; 8 } 9} 10 11class Bar extends Foo { 12 public static function test() : self { 13 return new Bar; 14 } 15} 16--EXPECTF-- 17Fatal error: Declaration of Bar::test(): Bar must be compatible with Foo::test(): Foo in %sinheritance005.php on line 12 18