What are the differences between using include and require in PHP for including external files?

When including external files in PHP, the main differences between using include and require are how they handle errors. The include statement will only produce a warning if the file is not found, allowing the script to continue execution. On the other hand, the require statement will produce a fatal error if the file is not found, halting the script execution.

// Using include to include an external file
include 'external_file.php';

// Using require to include an external file
require 'external_file.php';