The character or set of characters signifying the end of a line (EOL) is stored for you in this predefined constant.

You’ll commonly see “\n” in a script to denote the EOL and in many cases that will work fine but sometimes computers can be a little more picky. Windows, for example, would like you to use “\r\n”. Well, lucky for you this constant knows where it is and what to do.

$header  = 'POST /cgi-bin/webscr HTTP/1.0' . PHP_EOL;
$header .= 'Content-Type: application/x-www-form-urlencoded' . PHP_EOL;
$header .= 'Content-Length: ' . strlen($request) . PHP_EOL . PHP_EOL;

And here’s an archive of this PHP_EOL constant coming to life.