Are there any potential compatibility issues with using headers_list() in different environments?

When using the `headers_list()` function in different environments, there may be potential compatibility issues due to differences in server configurations or PHP versions. To ensure compatibility, it is recommended to check if the function exists before calling it. This can be done using the `function_exists()` function in PHP.

if (function_exists('headers_list')) {
    $headers = headers_list();
    // Use $headers array as needed
} else {
    // Handle the case where headers_list() is not available
}