Are there any potential pitfalls or drawbacks to using include_once() in PHP?

One potential pitfall of using include_once() in PHP is that it can slow down the performance of your application, as the file needs to be checked for inclusion every time it is called. To mitigate this issue, you can use require_once() instead, which will throw a fatal error if the file cannot be included, ensuring that it is included only once without the overhead of checking each time.

require_once('file.php');