xref: /PHP-5.5/Zend/tests/traits/bug60217b.phpt (revision 3f8c729e)
1--TEST--
2Bug #60217 (Requiring the same method from different traits and abstract methods have to be compatible)
3--FILE--
4<?php
5
6trait TBroken1 {
7    public abstract function foo($a);
8}
9
10trait TBroken2 {
11    public abstract function foo($a, $b = 0);
12}
13
14class CBroken {
15    use TBroken1, TBroken2;
16
17    public function foo($a) {
18        echo 'FOO';
19    }
20}
21
22$o = new CBroken;
23$o->foo(1);
24
25--EXPECTF--
26Fatal error: Declaration of TBroken2::foo($a, $b = 0) must be compatible with TBroken1::foo($a) in %s on line %d
27