What runtime configuration options in PHP can help with line ending recognition when reading files from a Macintosh computer?

When reading files from a Macintosh computer, one common issue is that the line endings may be different from those on other systems, such as Windows or Unix. To ensure proper line ending recognition, you can set the "auto_detect_line_endings" runtime configuration option in PHP. This option enables PHP to automatically detect the line endings used in the file being read, making it compatible with Macintosh line endings.

ini_set('auto_detect_line_endings', true);

// Your file reading code here
$file = fopen('example.txt', 'r');
while (($line = fgets($file)) !== false) {
    // Process each line
}
fclose($file);