1--TEST-- 2ReflectionMethod::getStaticVariables() should not bleed IS_TYPE_UNINITIALIZED 3--FILE-- 4<?php 5 6function test() { 7 echo "test() called\n"; 8 return 42; 9} 10 11function foo() { 12 $methodInfo = new ReflectionFunction(__FUNCTION__); 13 $nullWithIsTypeUninitialized = $methodInfo->getStaticVariables()['a']; 14 15 static $a = test(); 16 var_dump($a); 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; 22} 23 24foo(); 25foo(); 26 27?> 28--EXPECT-- 29test() called 30int(42) 31NULL 32