file_put_contents($filePath, $content, FILE_APPEND);
FILE_APPEND
Pro tip: use ```triple backticks around text``` to write in code fences