summaryrefslogtreecommitdiff
path: root/ext/reflection/tests/ReflectionProperty_getDeclaringClass_variation1.phpt
blob: 7ee787a3483020c488e17e53f0daea7d6ecfd8ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--TEST--
Test ReflectionProperty::getDeclaringClass() with inherited properties.
--FILE--
<?php

class A {
    public $prop;
}

class B extends A {
}

$propInfo = new ReflectionProperty('B', 'prop');
var_dump($propInfo->getDeclaringClass());

?>
--EXPECTF--
object(ReflectionClass)#%d (1) {
  ["name"]=>
  string(1) "A"
}