Annotation of embedaddon/php/Zend/tests/traits/property002.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Non-conflicting properties should work just fine.
        !             3: --FILE--
        !             4: <?php
        !             5: error_reporting(E_ALL);
        !             6: 
        !             7: trait THello1 {
        !             8:   public $hello = "hello";
        !             9: }
        !            10: 
        !            11: trait THello2 {
        !            12:   private $world = "World!";
        !            13: }
        !            14: 
        !            15: class TraitsTest {
        !            16:        use THello1;
        !            17:        use THello2;
        !            18:        function test() {
        !            19:            echo $this->hello . ' ' . $this->world;
        !            20:        }
        !            21: }
        !            22: 
        !            23: var_dump(property_exists('TraitsTest', 'hello'));
        !            24: var_dump(property_exists('TraitsTest', 'world'));
        !            25: 
        !            26: $t = new TraitsTest;
        !            27: $t->test();
        !            28: ?>
        !            29: --EXPECTF--    
        !            30: bool(true)
        !            31: bool(true)
        !            32: hello World!

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