Thanks for the confirmations Torben.
> > Can one code user-defined functions nested within one another
> Yes.
> > - and repeatedly execute them?
> No. ;)
>
> This is correct. As you know, the thing is that execution keeps running
> into that function declaration every time the containing functio
On Sat, 2002-02-09 at 15:40, DL Neil wrote:
> Hi,
> Have been experimenting with the array_walk function and a little array debug print
>facility, but ran into a
> problem with nested functions. The code can be written with nested functions and
>successfully executed once; but
> when repeatedly
Hi,
Have been experimenting with the array_walk function and a little array debug print
facility, but ran into a
problem with nested functions. The code can be written with nested functions and
successfully executed once; but
when repeatedly executed an error appears.
Can one code user-defined
>What about using classes instead of outer functions? Classes provide
>rather nice (nestable) scoping.
You're right! If I had written it from scratch classes would be the best
way!
Although, I'm a newbie and I haven't read the PHP object oriented capter yet
;-).
Hannes
--
PHP General Mailing
On Wednesday 16 May 2001 12:12, Hannes Schmiderer wrote:
> elias wrote:
> > good question...I might need an answer when you get one.
>
> Why?
> Ok, I have a perl-counter script which is included to shtml-pages with
> SSI. Now I want to add some PHP pages to my site. So I need a
> PHP-function that
elias wrote:
> good question...I might need an answer when you get one.
Why?
Ok, I have a perl-counter script which is included to shtml-pages with SSI.
Now I want to add some PHP pages to my site. So I need a PHP-function that
does the same as the perl-script does. In the script I have a lot of
good question...I might need an answer when you get one.
-elias
""Johannes Schmiderer"" <[EMAIL PROTECTED]> wrote in message
9ds7le$caa$[EMAIL PROTECTED]">news:9ds7le$caa$[EMAIL PROTECTED]...
> Is there no way to access the $x within the inner function:
>
> function outer()
> {
> $x = 50;
>
why don't you pass $x as an argument?
- Original Message -
From: "Johannes Schmiderer" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: 2001. május 15. 23:41
Subject: [PHP] nested functions
> Is there no way to access the $x within the inner
Is there no way to access the $x within the inner function:
function outer()
{
$x = 50;
function inner()
{
echo $x;
}
inner();
}
Global in the inner function does not work. I do not want to have $x global
for all.
Hannes Schmiderer
--
PHP General Mailing List (http://www.p
9 matches
Mail list logo