xref: /PHP-8.0/Zend/tests/traits/error_001.phpt (revision f8d79582)
1--TEST--
2Trying to use instanceof for a method twice
3--FILE--
4<?php
5
6trait foo {
7    public function foo() {
8        return 1;
9    }
10}
11
12trait foo2 {
13    public function foo() {
14        return 2;
15    }
16}
17
18
19class A extends foo {
20    use foo {
21        foo2::foo insteadof foo;
22        foo2::foo insteadof foo;
23    }
24}
25
26?>
27--EXPECTF--
28Fatal error: Class A cannot extend from trait foo in %s on line %d
29