1--TEST--
2Static variable with recursive initializer
3--FILE--
4<?php
5
6function foo($i) {
7    static $a = $i <= 10 ? foo($i + 1) : "Done $i";
8    var_dump($a);
9    return $i;
10}
11
12foo(0);
13foo(5);
14
15?>
16--EXPECT--
17string(7) "Done 11"
18string(7) "Done 11"
19string(7) "Done 11"
20string(7) "Done 11"
21string(7) "Done 11"
22string(7) "Done 11"
23string(7) "Done 11"
24string(7) "Done 11"
25string(7) "Done 11"
26string(7) "Done 11"
27string(7) "Done 11"
28string(7) "Done 11"
29string(7) "Done 11"
30