Static variables with recursive functions question


Example #6, shows a simple recursive function that counts to 10. My questions is what is the point of DEcrementing the $count variable at the end? Thanks for looking.

function test()
    static $count = 0;

    echo $count;
    if ($count < 10) {

My guess is so that the test() function can be used more than once. If $count only ever goes up, never down, then it will forever be >= 10 after the first run.