note 40740 deleted from function.require-once by felipe

From: Date: Tue, 22 Jul 2008 19:07:32 +0000
Subject: note 40740 deleted from function.require-once by felipe
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-142550@lists.php.net to get a copy of this message
Note Submitter: jaisen - at - jmathai - dot - com ---- NOTE: This function changed how it worked. In PHP 3 this behaved very differently than it does on PHP 4. Require used to include and parse the file regardless where the require line was positioned. For example (PHP3): <?php if(false){ require_once 'file_does_not_exist.php'; } ?> That code throw a fatal exception even though it's in a conditional block which evaluates to false. In PHP 4 the file is never included or parsed, so no exception is thrown. For example (PHP4) <?php if(false){ require_once '1_file_does_not_exists.php'; } require_once '2_file_does_not_exists.php'; ?> Stops execution of the script on trying to require the 2nd file...by bypasses the first require. --JM

« previous php.notes (#142550) next »