2011/7/6 Дмитрий Степанов
> PHP documentation of static keywords does not unambiguously explain
> behavior
> of "static" variables inside methods in example #1. I believe that in
> example #1 the exactly same instance of function (method) is used
> irregarding of how you call it (X::test() or Y::
>> The second case is referencing the varible of the class.
Maybe you are right. However, I don't really think that there is a true
"reference" to the class var in example #2.
PHP documentation of static keywords does not unambiguously explain behavior
of "static" variables inside methods in examp
I think you are confusing scope visibility level of the variable within
method and the class.
Variable within the method is going to 1 because it was declare within the
test method and there no link to the one declared outside the test method.
The second case is referencing the varible of the cl
, 10 de Febrero de 2006 12:45 a.m.
To: php-general@lists.php.net
Cc: suresh kumar
Subject: Re: [PHP] static variables
Suresh,
You could use the link to pass your variable to the next page, or to the
same page:
Instead of
$count=0;
use
if (!isset($_GET['count'])) $count=0;
Then fo
Suresh,
You could use the link to pass your variable to the next page, or to the
same page:
Instead of
$count=0;
use
if (!isset($_GET['count'])) $count=0;
Then for your link use
print "http://www.whatever.com?count=$count>link to new
page"
or use
print "link to same
page"
if you
5 matches
Mail list logo