What are the advantages and disadvantages of using relative paths versus absolute paths in PHP include statements?

When using include statements in PHP, relative paths are often preferred for their flexibility and portability. Relative paths are based on the current working directory of the script, making it easier to move files around without breaking the include. However, absolute paths can provide more certainty about the exact location of the file being included.

// Using relative path
include 'myFile.php';

// Using absolute path
include '/var/www/html/myFile.php';