File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / Zend / tests / bug65579.phpt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Mon Oct 14 08:02:49 2013 UTC (11 years, 6 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

    1: --TEST--
    2: Bug #65579 (Using traits with get_class_methods causes segfault)
    3: --FILE--
    4: <?php
    5: trait ParentTrait {
    6:     public function testMethod() { }
    7: }
    8: 
    9: trait ChildTrait {
   10:     use ParentTrait {
   11:         testMethod as testMethodFromParentTrait;
   12:     }
   13:     public function testMethod() { }
   14: }
   15: 
   16: class TestClass {
   17:     use ChildTrait;
   18: }
   19: 
   20: $obj = new TestClass();
   21: var_dump(get_class_methods($obj));
   22: ?>
   23: --EXPECT--
   24: array(2) {
   25:   [0]=>
   26:   string(10) "testMethod"
   27:   [1]=>
   28:   string(25) "testmethodfromparenttrait"
   29: }

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