xref: /PHP-8.1/ext/reflection/tests/bug80821.phpt (revision 3eb97a45)
1--TEST--
2Bug #80821: ReflectionProperty::getDefaultValue() returns current value for statics
3--FILE--
4<?php
5
6class Statics {
7	public static $staticVar = 1;
8}
9
10Statics::$staticVar = 2;
11
12$reflect = new \ReflectionClass(Statics::class);
13$prop = $reflect->getProperty("staticVar");
14var_dump($prop->getDefaultValue());
15
16?>
17--EXPECT--
18int(1)
19