How can the use of require_once in PHP code impact the functionality and performance of a website?

Using require_once in PHP code can impact the functionality and performance of a website by ensuring that a particular file is only included once in the script, preventing duplicate declarations or definitions that could cause errors. However, using require_once for multiple files can lead to slower performance due to the overhead of checking if the file has already been included. To optimize performance, it is recommended to use require instead of require_once when including files that do not need to be included multiple times.

// Using require instead of require_once for better performance
require 'file1.php';
require 'file2.php';
require 'file3.php';