RES: [PHP] 2 Questions: Static variables and the nature of the online manual
| From: | Thiago Pojda | Date: | Tue, 04 Mar 2008 16:59:07 +0000 |
| Subject: | RES: [PHP] 2 Questions: Static variables and the nature of the online manual | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-270938@lists.php.net to get a copy of this message | ||
-----Mensagem original-----
De: Svevo Romano [mailto:svevo@svevoromano.it]
Hi there,
Many thanks for your answer. I've also gone through your
example and it took me 10 minutes to understand how the
operator precedence was working there.
Was expecting 1 on the first call :)
But this is not the point. You've nailed my question very
preciseley in your first answer: 'the preceding line is only
run on the first call to the function'.
My only question is (at it is related to the nature of the
online manual):
how do you know it and I don't? This thing is the only logical
explanation to the fact the $a doesn't get initialized again to
0 in any subsequent call to the function, but it's not written
anywhere in the manual page. And it seems the most important
statement in my opinion, that justifies what I see as an
exception to a normal flow.
Hope all this makes sense.
Thanks,
S
<me>
You can use http://bugs.php.net/report.php to report a
documentation
"bug" and they'll change the docs :)
Thiago
</me>