Thanks for all your suggestions!! specially to "list"!!
Regards,
Miguel Guirao
-Original Message-
From: Richard Lynch [mailto:[EMAIL PROTECTED]
Sent: Viernes, 10 de Febrero de 2006 03:20 p.m.
To: Miguel Guirao
Cc: PHP List
Subject: Re: [PHP] Static and Global at the same time
On Fri, February 10, 2006 9:07 am, Miguel Guirao wrote:
> 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;
> }
No.
But if yo
A static defined variable used in a function will keep it's value each
time the function is called, but this function is available only for
function's scope.
A global defined variable used in a function will keep it's values (as
long as this value is not changed in "body" of the script or in
Andrei wrote:
What's the use of global static variables?
heh! we need to teach them to test out their own basic questions
and assumptions before we move them onto real analysis & deduction.
I agree though that a 'global static' looks to be pointless, then again
the behaviour in my littl
Miguel Guirao wrote:
Hello list!!
my name is not 'list' but I'll let you off this time.
Can I have a variable that is static and global at the same time within a
function?
here is some [linux] command line output that took about 30 seconds to
generate, it
answers your question. you'll ha
What's the use of global static variables?
Andy
Miguel Guirao wrote:
Hello list!!
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_
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
Hello list!!
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;
}
Best Regards,
---
Miguel Guirao Aguilera
Logistica R8
8 matches
Mail list logo