RE: [PHP-DEV] Reducing the number of system calls for includes
| From: | Lukas Smith | Date: | Sat, 25 Jan 2003 10:33:49 +0000 |
| Subject: | RE: [PHP-DEV] Reducing the number of system calls for includes | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-93670@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: George Schlossnagle [mailto:george@omniti.com]
> Sent: Saturday, January 25, 2003 5:28 AM
> To: Rasmus Lerdorf
> Cc: php-dev@lists.php.net
> Subject: Re: [PHP-DEV] Reducing the number of system calls for
includes
>
> On Friday, January 24, 2003, at 10:19 PM, Rasmus Lerdorf wrote:
>
> Weird. That was totally contrary to the way I remember it working.
In
> trying to figure out why I remembered incorrectly, I realized the
> reason why you (in general) want to resolve the path to a canonical
> path is that you can seriously break include_once and require_once if
> you dont. Otherwise require_once wont correctly work if you do
>
> <?
> require_once("/home/george/foo.php");
> require_once("/home/george/../george/foo.php");
> ?>
>
> (of course you can put together a less contrived example).
Yeah, we had the same problem in PEAR. And that is why we added
set_include_path to make it possible for people to keep their own little
repository of PEAR apps and still ensuring that they don't use different
relative include paths. I was really not happy with the solution at the
time. Because that means that I either have to fix all the PEAR apps
that I bundle with my application to not use the expensive include_path
or accept the performance hit.
Regards,
Lukas