File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / Zend / tests / traits / bugs / overridding-conflicting-methods.phpt
Revision 1.1.1.2 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Mon Oct 14 08:02:50 2013 UTC (10 years, 10 months ago) by misho
Branches: php, MAIN
CVS tags: v5_4_29p0, v5_4_29, v5_4_20p0, v5_4_20, HEAD
v 5.4.20

--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();
?>
--EXPECTF--	
Hello

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>