1--TEST--
2Inheritance Hinting Compile Checking Failure Internal Classes
3
4--INI--
5opcache.enable_cli=1
6
7--FILE--
8<?php
9class Foo {
10    public static function test() : Traversable {
11        return new ArrayIterator([1, 2]);
12    }
13}
14
15class Bar extends Foo {
16    public static function test() : Traversable {
17        return new ArrayObject([1, 2]);
18    }
19}
20
21var_dump(Bar::test());
22var_dump(Foo::test());
23
24--EXPECTF--
25object(ArrayObject)#%d (1) {
26  ["storage":"ArrayObject":private]=>
27  array(2) {
28    [0]=>
29    int(1)
30    [1]=>
31    int(2)
32  }
33}
34object(ArrayIterator)#%d (1) {
35  ["storage":"ArrayIterator":private]=>
36  array(2) {
37    [0]=>
38    int(1)
39    [1]=>
40    int(2)
41  }
42}
43