mirror of
https://github.com/php/php-src.git
synced 2024-09-21 09:57:23 +00:00
b765f96f5f
In the interest of avoiding side-effects during dumping, I'm replacing the value with a <constant ast> string instead of performing an update constant operation.
27 lines
419 B
PHP
27 lines
419 B
PHP
--TEST--
|
|
Bug #79778: Assertion failure if dumping closure with unresolved static variable
|
|
--FILE--
|
|
<?php
|
|
$closure1 = function() {
|
|
static $var = CONST_REF;
|
|
};
|
|
var_dump($closure1);
|
|
print_r($closure1);
|
|
?>
|
|
--EXPECT--
|
|
object(Closure)#1 (1) {
|
|
["static"]=>
|
|
array(1) {
|
|
["var"]=>
|
|
string(14) "<constant ast>"
|
|
}
|
|
}
|
|
Closure Object
|
|
(
|
|
[static] => Array
|
|
(
|
|
[var] => <constant ast>
|
|
)
|
|
|
|
)
|