summaryrefslogtreecommitdiff
path: root/Zend/tests/traits/error_001.phpt
blob: 31f2ab15c0a0cd677f76e9d952c60aed20a6f660 (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--
Trying to use instanceof for a method twice
--FILE--
<?php

trait foo {
    public function foo() {
        return 1;
    }
}

trait foo2 {
    public function foo() {
        return 2;
    }
}


class A extends foo {
    use foo {
        foo2::foo insteadof foo;
        foo2::foo insteadof foo;
    }
}

?>
--EXPECTF--
Fatal error: Class A cannot extend from trait foo in %s on line %d