xref: /php-src/ext/reflection/tests/bug30146.phpt (revision d9a7f674)
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--EXPECTF--
19int(1)
20int(2)
21
22Deprecated: Calling ReflectionProperty::setValue() with a single argument is deprecated in %s on line %d
23int(3)
24