summaryrefslogtreecommitdiff
path: root/Zend/tests/traits/bugs/overridding-conflicting-methods.phpt
blob: 1029dee63468cc77ee277a05363d1ff8bc10bac4 (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
29
30
31
--TEST--
Overriding Conflicting Methods should not result in a notice/warning about collisions
--FILE--
<?php
error_reporting(E_ALL);

trait THello1 {
  public function hello() {
    echo 'Hello';
  }
}

trait THello2 {
  public function hello() {
    echo 'Hello';
  }
}

class TraitsTest {
  use THello1;
  use THello2;
  public function hello() {
    echo 'Hello';
  }
}

$test = new TraitsTest();
$test->hello();
?>
--EXPECT--
Hello