What are the differences between using "include" and "require" in PHP?

The main difference between "include" and "require" in PHP is how they handle errors. "Include" will only produce a warning if the file is not found or cannot be included, while "require" will produce a fatal error and stop the script execution. It is generally recommended to use "require" when including files that are essential for the script to run properly.

// Using "require" to include a file that is essential for the script
require 'essential_file.php';