summaryrefslogtreecommitdiff
path: root/ext/reflection/tests/bug61388.phpt
blob: b9fe6bfaaa91b9e0a43a533afffec0be381b8630 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
--TEST--
ReflectionObject:getProperties() issues invalid reads when it get_properties returns a hash table with (inaccessible) dynamic numeric properties
--FILE--
<?php
$x = new ArrayObject();
$x[0] = 'test string 2';
$x['test'] = 'test string 3';
$reflObj = new ReflectionObject($x);
print_r($reflObj->getProperties(ReflectionProperty::IS_PUBLIC));

$x = (object)array("a", "oo" => "b");
$reflObj = new ReflectionObject($x);
print_r($reflObj->getProperties(ReflectionProperty::IS_PUBLIC));
--EXPECT--
Array
(
)
Array
(
    [0] => ReflectionProperty Object
        (
            [name] => 0
            [class] => stdClass
        )

    [1] => ReflectionProperty Object
        (
            [name] => oo
            [class] => stdClass
        )

)