xref: /PHP-8.2/Zend/tests/traits/error_010.phpt (revision f8d79582)
1--TEST--
2Trying to exclude trait method multiple times
3--FILE--
4<?php
5
6trait foo {
7    public function test() { return 3; }
8}
9trait c {
10    public function test() { return 2; }
11}
12
13class bar {
14    use foo, c { c::test insteadof foo; }
15    use foo, c { c::test insteadof foo; }
16}
17
18$x = new bar;
19var_dump($x->test());
20
21?>
22--EXPECTF--
23Fatal error: Failed to evaluate a trait precedence (test). Method of trait foo was defined to be excluded multiple times in %s on line %d
24