RE: [PEAR-DEV] include vs require
| From: | Tim Thorpe | Date: | Sun, 23 Feb 2003 21:48:00 +0000 |
| Subject: | RE: [PEAR-DEV] include vs require | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-13694@lists.php.net to get a copy of this message | ||
It was my understanding that require_once was made part of the PEAR
coding standard to prevent files from being re-included when
dependencies got hairy.
-----Original Message-----
From: Rasmus Lerdorf [mailto:rasmus@lerdorf.com]
Sent: Sunday, February 23, 2003 3:40 PM
To: Mika Tuupola
Cc: Fabien MARTY; Alexey Borzov; pear-dev@lists.php.net
Subject: Re: [PEAR-DEV] include vs require
On Sun, 23 Feb 2003, Mika Tuupola wrote:
> On Sun, 23 Feb 2003, Fabien MARTY wrote:
>
> > Note the use of include_once AND CERTAINLY NOT REQUIRE_ONCE !!!
>
> Note that after 4.0.2 include and require are identical
> except the way how they handle failure. So using include
> in conditional blocks does not seem to aply anymore.
>
> http://www.php.net/manual/en/function.require.php
Note also that include/require are faster than their
include_once/require_once counterparts, so if you are pretty sure you
won't be including a file multiple times by mistake, just use the
include/require version.
-Rasmus
--
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php