What is the best practice for creating line breaks in PHP to ensure consistent display across different platforms?

When creating line breaks in PHP, it is best to use the PHP_EOL constant to ensure consistent display across different platforms. This constant represents the correct end-of-line character for the current platform, whether it is Windows, Unix, or macOS. By using PHP_EOL, you can avoid compatibility issues and ensure that your line breaks are displayed correctly on all systems.

$text = "This is a multi-line text." . PHP_EOL;
$text .= "It will display correctly on all platforms." . PHP_EOL;
echo $text;