note that it does not return the status header
<?php
header('HTTP/1.1 301 Moved Permanently', true, 301);
header('foo: bar');
header('a: b');
header('colon less example');
print_r(headers_list());
?>
Array
(
[0] => X-Powered-By: PHP/5.4.7
[1] => foo: bar
[2] => a: b
)