xref: /php-src/Zend/tests/traits/conflict001.phpt (revision d9219f99)
1--TEST--
2Method conflict in traits
3--FILE--
4<?php
5error_reporting(E_ALL);
6
7trait THello1 {
8  private function hello() {
9    echo 'Hello';
10  }
11}
12
13trait THello2 {
14  private function hello() {
15    echo 'Hello';
16  }
17}
18
19class TraitsTest {
20    use THello1;
21    use THello2;
22}
23?>
24--EXPECTF--
25Fatal error: Trait method THello2::hello has not been applied as TraitsTest::hello, because of collision with THello1::hello in %s on line %d
26