Annotation of embedaddon/php/ext/reflection/tests/bug38132.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Reflection Bug #38132 (ReflectionClass::getStaticProperties() retains \0 in key names)
        !             3: --FILE--
        !             4: <?php
        !             5: class foo {
        !             6:        static protected $bar = 'baz';
        !             7:        static public $a = 'a';
        !             8: }
        !             9: 
        !            10: $class = new ReflectionClass('foo');
        !            11: $properties = $class->getStaticProperties();
        !            12: var_dump($properties, array_keys($properties));
        !            13: var_dump(isset($properties['*bar']));
        !            14: var_dump(isset($properties["\0*\0bar"]));
        !            15: var_dump(isset($properties["bar"]));
        !            16: ?>
        !            17: --EXPECT--
        !            18: array(2) {
        !            19:   ["bar"]=>
        !            20:   string(3) "baz"
        !            21:   ["a"]=>
        !            22:   string(1) "a"
        !            23: }
        !            24: array(2) {
        !            25:   [0]=>
        !            26:   string(3) "bar"
        !            27:   [1]=>
        !            28:   string(1) "a"
        !            29: }
        !            30: bool(false)
        !            31: bool(false)
        !            32: bool(true)

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