xref: /PHP-8.0/ext/reflection/tests/bug30146.phpt (revision a555cc0b)
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--EXPECT--
19int(1)
20int(2)
21int(3)
22