diff options
Diffstat (limited to 'ext/reflection/tests/bug30146.phpt')
| -rwxr-xr-x | ext/reflection/tests/bug30146.phpt | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/ext/reflection/tests/bug30146.phpt b/ext/reflection/tests/bug30146.phpt new file mode 100755 index 000000000..72c6d2e5f --- /dev/null +++ b/ext/reflection/tests/bug30146.phpt @@ -0,0 +1,23 @@ +--TEST--
+Bug #30146 (ReflectionProperty->getValue() requires instance for static property)
+--FILE--
+<?php
+class test {
+ static public $a = 1;
+}
+
+$r = new ReflectionProperty('test', 'a');
+var_dump($r->getValue(null));
+
+$r->setValue(NULL, 2);
+var_dump($r->getValue());
+
+$r->setValue(3);
+var_dump($r->getValue());
+?>
+===DONE===
+--EXPECT--
+int(1)
+int(2)
+int(3)
+===DONE===
\ No newline at end of file |
