What are some common debugging techniques to identify and resolve issues with PHP scripts that execute multiple times unexpectedly?

When PHP scripts execute multiple times unexpectedly, it could be due to the script being included or required multiple times in different parts of the code. To resolve this issue, you can use the `defined()` function to check if a constant has already been defined before including the script.

// Check if a constant is defined to prevent multiple executions
if (!defined('SCRIPT_EXECUTED')) {
    define('SCRIPT_EXECUTED', true);
    
    // Your PHP script code here
}