What are the differences between Windows CR LF, Mac Classic CR, and Unix LF in terms of line breaks in PHP?

When working with text files in PHP, it's important to consider the different line break conventions used by different operating systems. Windows uses CR LF (Carriage Return Line Feed), Mac Classic uses just CR (Carriage Return), and Unix uses LF (Line Feed). If you need to handle text files with different line break conventions, you can use the PHP function `preg_replace` to normalize the line breaks to a consistent format.

// Normalize line breaks to LF (Unix convention)
$file_contents = file_get_contents('file.txt');
$file_contents = preg_replace("/\r\n/", "\n", $file_contents); // Windows CR LF to Unix LF
$file_contents = preg_replace("/\r/", "\n", $file_contents); // Mac Classic CR to Unix LF

// Now $file_contents contains the text with Unix-style line breaks