function splitIntoLines(string $content): array { 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);
function splitIntoLines(string $content): array { 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);