/** * Write the tmp file and close it * * @return bool */ public static function write_close() { if (self::$sessionState === self::SESSION_STARTED) { self::$sessionState = self::SESSION_NOT_STARTED; return session_write_close(); } return true; }