Programming Tips - PHP: big string that is the contents of a file into lines

Date: 2021mar24 Language: php Q. PHP: big string that is the contents of a file into lines A. Use \R in preg_split()
function splitIntoLines($content) { return preg_split('/\R/', $content); }
This function will return blank lines (if any), use this option if you don't want empty lines:
preg_split('/\R/', $content, PREG_SPLIT_NO_EMPTY);