1--TEST--
2Test ReflectionProperty class errors.
3--FILE--
4<?php
5
6class C {
7    public static $p;
8}
9
10try {
11	new ReflectionProperty();
12} catch (TypeError $re) {
13	echo "Ok - ".$re->getMessage().PHP_EOL;
14}
15try {
16	new ReflectionProperty('C::p');
17} catch (TypeError $re) {
18	echo "Ok - ".$re->getMessage().PHP_EOL;
19}
20
21try {
22	new ReflectionProperty('C', 'p', 'x');
23} catch (TypeError $re) {
24	echo "Ok - ".$re->getMessage().PHP_EOL;
25}
26
27
28$rp = new ReflectionProperty('C', 'p');
29var_dump($rp->getName(1));
30var_dump($rp->isPrivate(1));
31var_dump($rp->isProtected(1));
32var_dump($rp->isPublic(1));
33var_dump($rp->isStatic(1));
34var_dump($rp->getModifiers(1));
35var_dump($rp->isDefault(1));
36
37?>
38--EXPECTF--
39Ok - ReflectionProperty::__construct() expects exactly 2 parameters, 0 given
40Ok - ReflectionProperty::__construct() expects exactly 2 parameters, 1 given
41Ok - ReflectionProperty::__construct() expects exactly 2 parameters, 3 given
42
43Warning: ReflectionProperty::getName() expects exactly 0 parameters, 1 given in %s on line %d
44NULL
45
46Warning: ReflectionProperty::isPrivate() expects exactly 0 parameters, 1 given in %s on line %d
47NULL
48
49Warning: ReflectionProperty::isProtected() expects exactly 0 parameters, 1 given in %s on line %d
50NULL
51
52Warning: ReflectionProperty::isPublic() expects exactly 0 parameters, 1 given in %s on line %d
53NULL
54
55Warning: ReflectionProperty::isStatic() expects exactly 0 parameters, 1 given in %s on line %d
56NULL
57
58Warning: ReflectionProperty::getModifiers() expects exactly 0 parameters, 1 given in %s on line %d
59NULL
60
61Warning: ReflectionProperty::isDefault() expects exactly 0 parameters, 1 given in %s on line %d
62NULL
63