Hello,
mind explain a little bit further cause i'm confused and not sure if the
fuction really work or something
On 1st example.... using unset() in a function
/////////////// CODE /////////////////
function foo() {
static $a;
$a++;
echo "$a<BR>";
unset($a);
}
foo();
foo();
foo();
///////////////////////////////////////////////
******* RESULT ********
1
2
3
************************
On 2nd example.... removing unset() in a function, result is same as with
unset() on it. Should it be all 1's at this time?
/////////////// CODE /////////////////
function foo() {
static $a;
$a++;
echo "$a<BR>";
}
foo();
foo();
foo();
///////////////////////////////////////////////
******* RESULT ********
1
2
3
************************
Is it the code, function, or my php setup..any idea ???
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php