What are the advantages and disadvantages of using absolute paths in PHP configuration files for includes?

Using absolute paths in PHP configuration files for includes can provide a clear and specific path to the included files, ensuring that the correct file is always included regardless of the current working directory. However, it can make the code less portable as the paths are hardcoded and may need to be updated if the file structure changes. It also makes the code less flexible and harder to maintain.

<?php
// Using absolute path for include
include '/var/www/html/includes/config.php';
?>