.. _structures-usefileappend: .. _use-file-append: Use File Append +++++++++++++++ When appending data to a file, one may also use the `file_put_contents() `_ function with the ``FILE_APPEND`` option. Using `file_put_contents() `_ also keeps the file open as little as possible, unlike keeping the resource open in PHP, between usages. .. code-block:: php Connex PHP features ------------------- + `file `_ Suggestions ___________ * Use file_put_contents() Specs _____ +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Short name | Structures/UseFileAppend | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Rulesets | :ref:`All `, :ref:`Changed Behavior `, :ref:`Suggestions ` | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Exakat since | 2.3.5 | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | PHP Version | All | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Severity | Minor | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Time To Fix | Quick (30 mins) | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Precision | High | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Available in | `Entreprise Edition `_, `Exakat Cloud `_ | +--------------+-------------------------------------------------------------------------------------------------------------------------+