What is the difference between using 'include' and 'require' in PHP file inclusion?

The main difference between using 'include' and 'require' in PHP file inclusion is that 'include' will only produce a warning if the file to be included is not found or cannot be included, while 'require' will produce a fatal error and stop the script execution. Therefore, if the included file is crucial for the script to run, 'require' should be used to ensure that the script does not continue without it.

// Using 'require' to include a crucial file
require 'myfile.php';