xref: /PHP-7.2/ext/reflection/tests/bug30146.phpt (revision 610c7fbe)
1--TEST--
2Reflection Bug #30146 (ReflectionProperty->getValue() requires instance for static property)
3--FILE--
4<?php
5class test {
6  static public $a = 1;
7}
8
9$r = new ReflectionProperty('test', 'a');
10var_dump($r->getValue(null));
11
12$r->setValue(NULL, 2);
13var_dump($r->getValue());
14
15$r->setValue(3);
16var_dump($r->getValue());
17?>
18===DONE===
19--EXPECT--
20int(1)
21int(2)
22int(3)
23===DONE===
24