src/StringUtils.php
public static function explodeTextlines(
        $input,
        $flag = SELF::OMIT_EMPTY_LINES
    ) {
    
        $out = explode(PHP_EOL, $input);
        if ($flag) {
            return $out;
        }
        // Reject empty words
        foreach ($out as $pos => $word) {
            if (empty($word)) {
                unset($out[$pos]);
            }
        }
        return $out;
    }
public static function explodeTextlines(
        $input,
        $flag = SELF::OMIT_EMPTY_LINES
    ) {
    
        $out = explode(PHP_EOL, $input);
        if ($flag) {
            return $out;
        }
        // Reject empty words
        foreach ($out as $pos => $word) {
            if (empty($word)) {
                unset($out[$pos]);
            }
        }
        return $out;
    }
Explodes string into lines of text using
the characters: Windows \r\n, Unix \n, Mac \r.
@param  string  $input
@param  boolean $flag  OMIT_EMPTY_LINES|KEEP_EMPTY_LINES
@return array