StackOverflow will not allow me to comment on hesselbom's answer (not enough reputation), so I'm adding my own...
$array = preg_split('/\s*\R\s*/', trim($text), NULL, PREG_SPLIT_NO_EMPTY);
This worked best for me because it also eliminates leading (second \s*) and trailing (first \s*) whitespace automatically and also skips blank lines (the PREG_SPLIT_NO_EMPTY flag).
-= OPTIONS =-
If you want to keep leading whitespace, simply get rid of the second \s* and make it an rtrim() instead...
$array = preg_split('/\s*\R/', rtrim($text), NULL, PREG_SPLIT_NO_EMPTY);
If you need to keep empty lines, get rid of the NULL (it is only a placeholder) and PREG_SPLIT_NO_EMPTY flag, like so...
$array = preg_split('/\s*\R\s*/', trim($text));
Or keeping both leading whitespace and empty lines...
$array = preg_split('/\s*\R/', rtrim($text));
I don't see any reason why you'd ever want to keep trailing whitespace, so I suggest leaving the first \s* in there. But, if all you want is to split by new line (as the title suggests), it is THIS simple (as mentioned by Jan Goyvaerts)...
$array = preg_split('/\R/', $text);
s($yourString)->normalizeLineEndings()is available with github.com/delight-im/PHP-Str (library under MIT License) which has lots of other useful string helpers. You may want to take a look at the source code. - caw