public static function appendLines(string $filename, array $lines, string $separator = "\n"): int
    {
        if (self::exist($filename)) {
            $existingLines = self::getLines($filename);
            $lines = array_merge($existingLines, $lines);
            return self::putLines($filename, $lines, $separator);
        }
        return self::putLines($filename, $lines, $separator);
    }
public static function appendLines(string $filename, array $lines, string $separator = "\n"): int
    {
        if (self::exist($filename)) {
            $existingLines = self::getLines($filename);
            $lines = array_merge($existingLines, $lines);
            return self::putLines($filename, $lines, $separator);
        }
        return self::putLines($filename, $lines, $separator);
    }
public static function appendLines ( string $ filename , array $ lines , string $ separator = "\n" ) : int { if ( self :: exist ( $ filename ) ) { $ existingLines = self :: getLines ( $ filename ) ; $ lines = array_merge ( $ existingLines , $ lines ) ; return self :: putLines ( $ filename , $ lines , $ separator ) ; } return self :: putLines ( $ filename , $ lines , $ separator ) ; }
Append lines.

@param string $filename
@param string[] $lines
@param string $separator Default "\n".
@return int
Append lines .