We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 43362cc commit a7dbfd3Copy full SHA for a7dbfd3
ext/reflection/tests/ReflectionMethod_getStaticVariables_basic_extra_bleed.phpt
@@ -10,11 +10,15 @@ function test() {
10
11
function foo() {
12
$methodInfo = new ReflectionFunction(__FUNCTION__);
13
- $null = $methodInfo->getStaticVariables()['a'];
+ $nullWithIsTypeUninitialized = $methodInfo->getStaticVariables()['a'];
14
15
static $a = test();
16
var_dump($a);
17
- $a = $null;
+
18
+ // Technically, IS_TYPE_UNINITIALIZED does bleed, but it doesn't matter since there's no way we
19
+ // can assign it to the static variable directly instead of the reference.
20
+ $staticVar = &$methodInfo->getStaticVariables()['a'];
21
+ $staticVar = $nullWithIsTypeUninitialized;
22
}
23
24
foo();
0 commit comments