Re: [PHP4BETA] Expected behavior?
| From: | Mark Constable | Date: | Mon, 01 May 2000 11:39:34 +0000 |
| Subject: | Re: [PHP4BETA] Expected behavior? | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-14263@lists.php.net to get a copy of this message | ||
Wico de Leeuw wrote:
> Put file 3 in include_path or supplie the full pathname
> else php can not find the include file (Expected behavior)
> also put a . into the include_path (when given an include path php will not
> auto add the current dir)
> (annoying behavior :)
> At 02:52 1-5-2000 -0700, Seth Banks wrote:
> >I have a page that requires a class file, and in that file (file 2) it
> >requires another file (file 3). On the 1st required file I get an error on
> >compile because php can't find file 3. File 1 lives in a different directory
> >than file 2, which is causing the error.
So does this mean that PHP will always pull any included file, and
it's contents (vars, functions, paths), into it's global namespace
of the original executing file (class'd or not) and not directly
into the namespace of the calling file/script/class however many
levels deep that might be ?
If so then that's not intuitive and I'm wondering if there is reason
to "flatten" out namespaces ? Is it a limitation of PHP, a legacy
of old PHP3 bevaviour, or is there some real benefits to having this
flattened namespace ? All else about PHP4 seems uber-groovy.
--markc