On Wed, 18 Feb 2004 15:39:10 +0100 Pierre-Alain Joye <[EMAIL PROTECTED]> wrote:
> On Wed, 18 Feb 2004 15:27:56 +0100 > [EMAIL PROTECTED] (Pierre-Alain Joye) wrote: > > > Hello, > > > > Having the scripts pasted below: > > > > include_once fails to declare the variable 'foo'. Replace include_once > > by include and it works. I got the same behavior using require and > > require_once. > > To be precised: it fails to declare the variable on the 2nd call. The > 1st call works. because it doesn't really include this file on the 2nd call. [quote] include_once() should be used in cases where the same file might be included and evaluated more than once during a particular execution of a script, and you want to be sure that it is included exactly once to avoid problems with function redefinitions, variable value reassignments, etc. [/quote] thus, this is expected behaviour. --- WBR, Antony Dovgal aka tony2001 [EMAIL PROTECTED] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php