Re: Coding Standards
| From: | Aidan Lister | Date: | Tue, 22 Jun 2004 20:13:44 +0000 |
| Subject: | Re: Coding Standards | ||
| References: | 1 2 3 4 | Groups: | php.pear.doc |
| Request: | Send a blank email to pear-doc+get-4549@lists.php.net to get a copy of this message | ||
> But, using basename() doesn't speed that up at all. You'd still be left
> with a relative path, which relies on searching the include path.
I think basename would not return a relative path with __FILE__, I'll have
to check.
Martin asked about the speed increase - as Daniel says it's due to searching
the include path for the file.
> Anyway, your revisions to the wording are good. For clarity, the "Either
> of these will ensure" paragraph should follow the first paragraph. Also,
> let's use the <command> tag rather than <function> tag so the "()"
> don't
> get appended. Finally, I'd reword the "The only places where" paragraph
> as follows:
>
> The only places where
> <command>include</command>/<command>require</command>
> should be used instead of
> <command>include_once</command>/<command>require_once</command>
> is when the included file contains <emphasis>procedural</emphasis>
> code that <emphasis>must</emphasis> be included again.
> For example, the include file contains procedural code that
> behaves differently depending on the location it is included from.
Much much better, I like it!
Thanks Dan