xref: /PHP-7.4/Zend/tests/bug78335.phpt (revision ec9a96dc)
1--TEST--
2Bug #78335: Static properties/variables containing cycles report as leak
3--FILE--
4<?php
5
6class Test {
7    public static $test;
8
9    public static function method() {
10        static $foo;
11        $foo = [&$foo];
12    }
13}
14
15function test() {
16    static $foo;
17    $foo = [&$foo];
18}
19
20$foo = [&$foo];
21Test::$test = $foo;
22test();
23Test::method();
24
25?>
26===DONE===
27--EXPECT--
28===DONE===
29