1--TEST--
2header() and friends
3--FILE--
4<?php
5
6$v1 = headers_sent();
7$v2 = headers_list();
8var_dump(header("HTTP 1.0", true, 200));
9
10var_dump($v1);
11var_dump($v2);
12
13var_dump(header(""));
14var_dump(header("", true));
15var_dump(headers_sent());
16var_dump(headers_list());
17var_dump(header("HTTP blah"));
18var_dump(header("HTTP blah", true));
19var_dump(headers_sent());
20var_dump(headers_list());
21
22echo "Done\n";
23?>
24--EXPECTF--
25NULL
26bool(false)
27array(0) {
28}
29
30Warning: Cannot modify header information - headers already sent by (output started at %s:%d) in %s on line %d
31NULL
32
33Warning: Cannot modify header information - headers already sent by (output started at %s:%d) in %s on line %d
34NULL
35bool(true)
36array(0) {
37}
38
39Warning: Cannot modify header information - headers already sent by (output started at %s:%d) in %s on line %d
40NULL
41
42Warning: Cannot modify header information - headers already sent by (output started at %s:%d) in %s on line %d
43NULL
44bool(true)
45array(0) {
46}
47Done
48