Re: variable scope question (extended)
| From: | Kristian Köhntopp | Date: | Thu, 07 Dec 2000 15:04:05 +0000 |
| Subject: | Re: variable scope question (extended) | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-40382@lists.php.net to get a copy of this message | ||
Barbara Lindsey wrote:
> Has someone found a way to do this?
There is no way to do this, and it is by design. If there were
such a scope for variables, we would have to introduce "friend"
as well, opening another can of worms.
If you want private variables, prefix their names with "_"
and document all "_"-names as being off limits.
Kristian
--
Kristian Köhntopp, NetUSE AG Siemenswall, D-24107 Kiel
Tel: +49 431 386 436 00, Fax: +49 431 386 435 99
Using PHP3? See our web development library at http://phplib.netuse.de/