I would like to know if its possible to clear the current information stored in header_list()
if(headers_sent()){ foreach(headers_list() as $header){
To remove them all it's pretty simple:
if ( ! headers_sent() ) { header_remove(); }
No looping required. If you don't pass a parameter to header_remove, it removes all headers set by PHP.
header_remove