RE: [PEAR-DEV] dirname(__FILE__)

From: Date: Wed, 16 Oct 2002 21:59:00 +0000
Subject: RE: [PEAR-DEV] dirname(__FILE__)
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-10091@lists.php.net to get a copy of this message
> From: Martin Jansen [mailto:mj@php.net] > Sent: Wednesday, October 16, 2002 11:49 PM > To: Stig S. Bakken > Cc: Wolfram Kriesing; Lukas Smith; 'PHP PEAR Developer' > Subject: Re: [PEAR-DEV] dirname(__FILE__) > > On Wed Oct 16, 2002 at 07:3322PM +0200, Stig S. Bakken wrote: > > Right now, dirname(__FILE__) seems to be the only solution that works. > > Does it solve all the problems of people trapped in PHP environment > > where they can't change php.ini? > > I'm actually a bit afraid about the performance impact it might have > to have dirname(__FILE__) calls all around the place. The probably > best solution would be to have a new built-in constant (like > __BASEDIR__), but this would force every PEAR user to update to the > version of PHP that has introduced this feature ... Of course there is a performance overhead. But for anyone that has problems with this a solution is pretty simple and requires few knowledge: remove these calls. Another solution would be to use one of the commercial or free script caches etc. I think the performance overhead is not so critical. But the ease of use advantage is considerable. Maybe someone with enough know how can look at the relevant code and see if there is anything in PHP that could be tweaked to make the performance overhead a little less, but even then it should be fairly minor. Then again I have not bothered to benchmark them. Regards, Lukas

« previous php.pear.dev (#10091) next »