xref: /PHP-5.6/ext/reflection/tests/bug61388.phpt (revision 773bedb1)
1--TEST--
2ReflectionObject:getProperties() issues invalid reads when it get_properties returns a hash table with (inaccessible) dynamic numeric properties
3--FILE--
4<?php
5$x = new ArrayObject();
6$x[0] = 'test string 2';
7$x['test'] = 'test string 3';
8$reflObj = new ReflectionObject($x);
9print_r($reflObj->getProperties(ReflectionProperty::IS_PUBLIC));
10
11$x = (object)array("a", "oo" => "b");
12$reflObj = new ReflectionObject($x);
13print_r($reflObj->getProperties(ReflectionProperty::IS_PUBLIC));
14--EXPECT--
15Array
16(
17    [0] => ReflectionProperty Object
18        (
19            [name] => test
20            [class] => ArrayObject
21        )
22
23)
24Array
25(
26    [0] => ReflectionProperty Object
27        (
28            [name] => oo
29            [class] => stdClass
30        )
31
32)
33