jaisen - at - jmathai - dot - com
13-Mar-2004 04:10
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 '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 '1_file_does_not_exists.php';
}
require '2_file_does_not_exists.php';
?>
Stops
execution of the script on trying to require the 2nd file...by bypasses the
first require.
--JM