In what scenarios is it recommended to use absolute paths instead of relative paths in PHP?

When working with files or directories in PHP, it is recommended to use absolute paths instead of relative paths when the file or directory location may change or when referencing files outside the current directory. Absolute paths provide a fixed reference point to the file or directory regardless of the current working directory.

// Using absolute path to include a file
include_once('/var/www/html/includes/config.php');