Skip to content

Commit a7dbfd3

Browse files
committed
Add comment to IS_TYPE_UNINITIALIZED test
1 parent 43362cc commit a7dbfd3

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

ext/reflection/tests/ReflectionMethod_getStaticVariables_basic_extra_bleed.phpt

+6-2
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,15 @@ function test() {
1010

1111
function foo() {
1212
$methodInfo = new ReflectionFunction(__FUNCTION__);
13-
$null = $methodInfo->getStaticVariables()['a'];
13+
$nullWithIsTypeUninitialized = $methodInfo->getStaticVariables()['a'];
1414

1515
static $a = test();
1616
var_dump($a);
17-
$a = $null;
17+
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;
1822
}
1923

2024
foo();

0 commit comments

Comments
 (0)