Distinguishing explanation
1. require is unconditional. If require is added during the process, it will be executed first regardless of whether it is established or not.
When the file does not exist or cannot be opened, an error will be prompted and program execution will be terminated.
2. Include has a return value, but require does not.
(Maybe because require is faster than include), if the included file does not exist, an error will be prompted, but the program will continue to execute.
3. Require syntax errors are more troublesome, but include is not.
require instance
<?php require 'no.php'; echo '123'; ?>
include instance
<?php include 'no.php'; echo '123'; ?>
The above is the difference between require and include in php. I hope it will be helpful to everyone.