public static function write($filePath, $content, $compareContents = false)
    {
        if ($compareContents && self::compareContents($filePath, $content)) {
            return 0;
        }

        return file_put_contents($filePath, $content);
    }
public static function write($filePath, $content, $compareContents = false)
    {
        if ($compareContents && self::compareContents($filePath, $content)) {
            return 0;
        }

        return file_put_contents($filePath, $content);
    }
public static function write ( $ filePath , $ content , $ compareContents = false ) { if ( $ compareContents && self :: compareContents ( $ filePath , $ content ) ) { return 0 ; } return file_put_contents ( $ filePath , $ content ) ; }
Writes string content to a file

@param $filePath
@param $content
@param bool $compareContents     Determines if new content should be compared with the
current file content. When contents are the same, then
new content will not be written to the file.
@return int                      Number of bytes that were written to the file
Writes string content to a file