What are the limitations of using auto_append_file in PHP when die() or exit functions are present?

When using auto_append_file in PHP and die() or exit functions are present, the appended file will not be included in the output if the script is terminated before completion. To solve this issue, you can manually include the appended file at the end of your script, after all potential die() or exit calls.

// Your PHP code here

// Include the appended file at the end of the script
$autoAppendFile = 'path/to/appended_file.php';
if (file_exists($autoAppendFile)) {
    include $autoAppendFile;
}