Re: Static and Global at the same time!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Can I have a variable that is static and global at the same time within a
function?
Let's say I have:
$data = "";
function newdata() {
 static global $data;
 $data [$i] = $newdatatobestored_inthearray;
}

Isn't a global variable static within the function by it's nature of being global? Making it so that the static keyword is superfluous?

Hmmm... Well, that is, of course, assuming that the function is the only place the variable is ever modified...

thnx,
Chris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux