1--TEST--
2Static variables in dynamically declared function (first use after dynamic def dtor)
3--FILE--
4<?php
5
6$code = <<<'CODE'
7if (1) {
8    function test() {
9        static $x = 0;
10        var_dump(++$x);
11    }
12}
13CODE;
14eval($code);
15test();
16test();
17
18?>
19--EXPECT--
20int(1)
21int(2)
22