1--TEST--
2Static variables in dynamically declared function (first use before 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    test();
13}
14CODE;
15eval($code);
16test();
17
18?>
19--EXPECT--
20int(1)
21int(2)
22