mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
22 lines
278 B
Plaintext
22 lines
278 B
Plaintext
|
--TEST--
|
||
|
Static variables in dynamically declared function (first use after dynamic def dtor)
|
||
|
--FILE--
|
||
|
<?php
|
||
|
|
||
|
$code = <<<'CODE'
|
||
|
if (1) {
|
||
|
function test() {
|
||
|
static $x = 0;
|
||
|
var_dump(++$x);
|
||
|
}
|
||
|
}
|
||
|
CODE;
|
||
|
eval($code);
|
||
|
test();
|
||
|
test();
|
||
|
|
||
|
?>
|
||
|
--EXPECT--
|
||
|
int(1)
|
||
|
int(2)
|