How to Modify & Edit HTTP Header via WordPress PHP Functions

Occasionally there may be a need to add, edit, modify or remove the HTTP response headers sent in respond to requests from web browsers. For example, you may want to add the cache-control, expires, vary, user agent, [...]