summaryrefslogtreecommitdiff
path: root/Zend/tests/bug71248.phpt
blob: 6be2585767e10440f3b73c24b4523e0e7c0ef939 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
--TEST--
Bug #71248 (Wrong interface is enforced)
--FILE--
<?php
class Hint1 { }
class Hint2 { }

abstract class Base {
    public function __construct(Hint1 $x) { }
}

interface Iface {
    public function __construct(Hint1 $x);
}

class Foo extends Base implements Iface {
}

$code = <<<'PHP'
abstract class Bar extends Base {
    public function __construct(Hint2 $x) { }
}
PHP;
eval($code);
?>
OK
--EXPECT--
OK