Re: [PHP4BETA] Expected behavior?
| From: | Wico de Leeuw | Date: | Mon, 01 May 2000 13:17:45 +0000 |
| Subject: | Re: [PHP4BETA] Expected behavior? | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-14265@lists.php.net to get a copy of this message | ||
At 21:39 1-5-2000 +1000, Mark Constable wrote:
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:You gotta test that i thought soI 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 differentdirectorythan 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 thisI have found then when you do a eval('inlude "file.ext"') from a function the vars will only live inside that function Greetz, Wico
flattened namespace ? All else about PHP4 seems uber-groovy. --markc -- PHP 4.0 Beta Mailing List <http://www.php.net/version4/> To unsubscribe, e-mail: php4beta-unsubscribe@lists.php.net For additional commands, e-mail: php4beta-help@lists.php.net To contact the list administrators, e-mail: php4beta-admin@lists.php.net