Annotation of embedaddon/php/Zend/tests/traits/bugs/alias-semantics.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Semantic of alias operation is to provide an additional identifier for the method body of the original method.
! 3: --FILE--
! 4: <?php
! 5: error_reporting(E_ALL);
! 6:
! 7: trait THello {
! 8: public function a() {
! 9: echo 'A';
! 10: }
! 11: }
! 12:
! 13: class TraitsTest {
! 14: use THello { a as b; }
! 15: }
! 16:
! 17: $test = new TraitsTest();
! 18: $test->a();
! 19: $test->b();
! 20:
! 21: ?>
! 22: --EXPECTF--
! 23: AA
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>