1--TEST-- 2Inheritance Hinting Compile Checking Failure Internal Classes 3--INI-- 4opcache.enable_cli=1 5--FILE-- 6<?php 7class Foo { 8 public static function test() : Traversable { 9 return new ArrayIterator([1, 2]); 10 } 11} 12 13class Bar extends Foo { 14 public static function test() : ArrayObject { 15 return new ArrayObject([1, 2]); 16 } 17} 18--EXPECTF-- 19Fatal error: Declaration of Bar::test(): ArrayObject must be compatible with Foo::test(): Traversable in %sinheritance007.php on line 12 20