blob: bf525e1c4f086e924f56c3f5b1b2071a9e773a31 (
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
|
--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());
echo "Wrong number of params:\n";
$propInfo->getDeclaringClass(1);
?>
--EXPECTF--
object(ReflectionClass)#%d (1) {
["name"]=>
string(1) "A"
}
Wrong number of params:
Warning: ReflectionProperty::getDeclaringClass() expects exactly 0 parameters, 1 given in %s on line %d
|