[PHP] Accessing a variable from inside a local function

2004-07-28 Thread Frank Munch
Would anyone know how to resolve this scope problem? Or is this possibly something PHP can't (yet) do? The problem is to access a variable in a function foo from a function local to foo. - - - function foo($var_foo) { $my_foo_local = 10; //How can I reach this from inside function

Re: [PHP] Re: Accessing a variable from inside a local function

2004-07-28 Thread Frank Munch
Thanks for the good suggestion, a fully usable workaround if a cleaner thing doesn't surface. And for your response time.. well, I have had slower answers in phone-conversations... :-) At 06:37 PM 7/28/2004, Jason Barnett wrote: Something like this is probably better handled by a class. Then

RE: [PHP] Accessing a variable from inside a local function

2004-07-28 Thread Frank Munch
At 07:39 PM 7/28/2004, Ford, Mike [LSS] wrote: Actually, your problem is that the function bar is *not* local to foo. Even though PHP lets you declare functions lexically within the scope of other functions snip Ouch! Thanks! Got that much wiser! So for keeping the namespace cleaner

Re: [PHP] Using Post like Get

2004-07-23 Thread Frank Munch
Hi, a cookie is path-specific - can that help you? Frank At 10:54 PM 8/23/2004, you wrote: What I'm trying to achieve is to have the same cookie IDENTIFY a user on different (or same) applications (on the same server), but require them to log in for each application, and get a different

Re: [PHP] Re: Project-browser-function / required/included

2004-07-22 Thread Frank Munch
Hi, thanks for your comment. Right, and similarly, it struck me that in case there are variable-names in the path, like in require_once $my_lib_dir . some_funcs.php; the variable $my_lib_dir could only be known at run-time and not by any simple script just scanning the source. Still, it would

[PHP] Project-browser-function / required/included

2004-07-21 Thread Frank Munch
Hello, it would be nice to get a list of all required/included-files in a project. Would anyone know of such a tool, e.g. a PHP-function that would take a filename as input and then recursively scan for the tree of required/included files? Also HTML-links (A HREF...) and similar would be nice

Re: [PHP] exec/system question..

2004-07-21 Thread Frank Munch
On Wed, 21 Jul 2004 10:09:52 -0700, bruce [EMAIL PROTECTED] wrote: 2) i could run the perl script, and have it somehow run in the background this would ba good, if there's a way to essentially run the php script in the background such that it doesn't hang apache. Do you mean ...to

Re: [PHP] Function with Optional Arguments

2004-07-21 Thread Frank Munch
You can use default arguments: func foo($first, $second=2, $third=3 etc. or look at function func_num_args(... HIH Frank At 01:39 AM 7/22/2004, Alex Hogan wrote: Hi All, How do I write a function with optional arguments? Is it possible in php? function myfunc($First, $Second,[$Third, $Fourth]){