Re: cvs: pear /Net_Finger Finger.php /Net_Whois Whois.php
| From: | Jon Parise | Date: | Sun, 18 Nov 2001 17:59:19 +0000 |
| Subject: | Re: cvs: pear /Net_Finger Finger.php /Net_Whois Whois.php | ||
| References: | 1 2 | Groups: | php.pear.cvs |
| Request: | Send a blank email to pear-cvs+get-1356@lists.php.net to get a copy of this message | ||
On Fri, Nov 16, 2001 at 07:41:00AM +0100, Stig S. Bakken wrote:
> > mj Thu Nov 15 16:09:04 2001 EDT
> >
> > Modified files:
> > /pear/Net_Finger Finger.php
> > /pear/Net_Whois Whois.php
> > Log:
> > * PEAR.php is already included by Net/Socket.php -> no need to do that
> > also here.
> > # Should save same execution time.
>
> If the file is already "required", require_once on it again returns
> immediately, you can probably count the overhead in CPU cycles.
> However, you should never assume anything about what other packages
> include, but always be explicit about what your package requires (that's
> some of the point with require_once). If Net_Finger extends PEAR, it
> should require it too.
Agreed. It doesn't make sense to obscure the dependencies just
to save a clock cycle or two.
--
Jon Parise (jon@csh.rit.edu) . Information Technology (2001)
http://www.csh.rit.edu/~jon/ : Computer Science House
Member