RE: [PEAR-DEV] dirname(__FILE__)

From: Date: Thu, 17 Oct 2002 09:50:16 +0000
Subject: RE: [PEAR-DEV] dirname(__FILE__)
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-10099@lists.php.net to get a copy of this message
> From: Markus Wolff [mailto:wolff@21st.de] > Sent: Thursday, October 17, 2002 11:08 AM > To: Wolfram Kriesing > Cc: smith@dybnet.de; 'Alan Knowles'; 'PHP PEAR Developer' > Subject: Re: [PEAR-DEV] dirname(__FILE__) > > Am Thu, 17 Oct 2002 10:55:13 +0200 schrieb Wolfram Kriesing > <lists@kriesing.de>: > > > Lukas Smith wrote: > > > Well the reason I suggested dirname(__FILE__) is that I need to > > > distribute any installation with the pear packages it requires. This > is > > > for QA reasons. There may of course be different installations on the > > > same server where different versions of a single pear package are used. > > +1 > > exactly that's also a reason why i think dirname(__FILE__) is a very > > good solution!!! > > Also, I don´t think it´s that much of a performance hit when compared to > including via include_path. Normally, PHP will search for a file in the > same directory first. If it´s not there (likely), it will try to access > it in the next directory as specified in the include_path - and so on. > > I really don´t think this procedure is much faster than using dirname(), > especially when PEAR is not the second entry in the include_path for > whatever reason. > Actually you are quite right there appearently. I asked a few developers and they also say that dirname(__FILE__) should be a lot faster than searching in the include path. So not only will it allow people to better bundle pear packages with their app it will even improve speed :-) Regards, Lukas

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