8 public static int $static_prop = 1;
9 <<__LateInit
>> public static Bar
$bar;
12 public static function foo_method_memoized(): int {
13 return self
::$static_prop;
17 public static function foo_method_memoized_lsb(): Bar
{
18 return self
::$bar; // A global variable is passed to (or returned from) a function call.
23 function fun_memoized(): Bar
{
28 function fun_memoized_vec_int(): vec
<int> {
33 public function test_method_call(): void
{
34 (Foo
::$bar)->prop
= 1; // A global variable is written.
36 $a = Foo
::foo_method_memoized();
39 $b = Foo
::foo_method_memoized_lsb();
40 $b->prop
= 2; // A global variable is written.
43 $c->prop
= 2; // A global variable is written.
45 $d = fun_memoized_vec_int();