What is the recommended method for including files in a switch-case statement in PHP?

When including files in a switch-case statement in PHP, it is recommended to use the "require_once" or "include_once" functions to ensure that the file is included only once to prevent any conflicts or errors. This helps maintain code clarity and organization, making it easier to manage and debug.

switch ($variable) {
    case 'case1':
        require_once 'file1.php';
        break;
    case 'case2':
        require_once 'file2.php';
        break;
    default:
        require_once 'default.php';
}