What are best practices for ensuring consistent file inclusion behavior in PHP scripts across different environments?

In order to ensure consistent file inclusion behavior in PHP scripts across different environments, it is recommended to use absolute paths when including files rather than relative paths. This helps avoid issues related to file paths being interpreted differently in various environments.

// Use absolute paths for file inclusions
include_once __DIR__ . '/path/to/file.php';