xref: /PHP-8.2/Zend/tests/traits/conflict003.phpt (revision d9219f99)
1--TEST--
2Two methods resulting in a conflict, should be reported both.
3--FILE--
4<?php
5error_reporting(E_ALL);
6
7trait A {
8   public function smallTalk() {
9     echo 'a';
10   }
11   public function bigTalk() {
12     echo 'A';
13   }
14}
15
16trait B {
17   public function smallTalk() {
18     echo 'b';
19   }
20   public function bigTalk() {
21     echo 'B';
22   }
23}
24
25class Talker {
26   use A, B;
27}
28
29?>
30--EXPECTF--
31Fatal error: Trait method B::smallTalk has not been applied as Talker::smallTalk, because of collision with A::smallTalk in %s on line %d
32