xref: /PHP-8.1/Zend/tests/bug79778.phpt (revision b765f96f)
1--TEST--
2Bug #79778: Assertion failure if dumping closure with unresolved static variable
3--FILE--
4<?php
5$closure1 = function() {
6    static $var = CONST_REF;
7};
8var_dump($closure1);
9print_r($closure1);
10?>
11--EXPECT--
12object(Closure)#1 (1) {
13  ["static"]=>
14  array(1) {
15    ["var"]=>
16    string(14) "<constant ast>"
17  }
18}
19Closure Object
20(
21    [static] => Array
22        (
23            [var] => <constant ast>
24        )
25
26)
27