RE: [PHP] Accessing a variable from inside a local function
| From: | Frank Munch | Date: | Wed, 28 Jul 2004 13:36:53 +0000 |
| Subject: | RE: [PHP] Accessing a variable from inside a local function | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-192093@lists.php.net to get a copy of this message | ||
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 using classes is the only way.