xref: /PHP-7.2/Zend/tests/bug71248.phpt (revision 50be2c89)
1--TEST--
2Bug #71248 (Wrong interface is enforced)
3--FILE--
4<?php
5class Hint1 { }
6class Hint2 { }
7
8abstract class Base {
9    public function __construct(Hint1 $x) { }
10}
11
12interface Iface {
13    public function __construct(Hint1 $x);
14}
15
16class Foo extends Base implements Iface {
17}
18
19$code = <<<'PHP'
20abstract class Bar extends Base {
21    public function __construct(Hint2 $x) { }
22}
23PHP;
24eval($code);
25?>
26OK
27--EXPECT--
28OK
29