Annotation of embedaddon/php/Zend/tests/traits/language009.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: In instead definitions all trait whose methods are meant to be hidden can be listed.
                      3: --FILE--
                      4: <?php
                      5: error_reporting(E_ALL);
                      6: 
                      7: trait A {
                      8:    public function foo() {
                      9:      echo 'a';
                     10:    }
                     11: }
                     12: 
                     13: trait B {
                     14:    public function foo() {
                     15:      echo 'b';
                     16:    }
                     17: }
                     18: 
                     19: trait C {
                     20:    public function foo() {
                     21:      echo 'c';
                     22:    }
                     23: }
                     24: 
                     25: class MyClass {
                     26:     use C, A, B {
                     27:                B::foo insteadof A, C; 
                     28:        }
                     29: }
                     30: 
                     31: $t = new MyClass;
                     32: $t->foo();
                     33: 
                     34: ?>
                     35: --EXPECTF--    
                     36: b

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