forked from php/php-src
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhead.phpt
53 lines (46 loc) · 821 Bytes
/
head.phpt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
--TEST--
header() and friends
--FILE--
<?php
$sent1 = headers_sent();
$list1 = headers_list();
header("HTTP 1.1", true, 200);
$list2 = headers_list();
header("Date: Mon, 25 Mar 1985 00:20:00 GMT");
$list3 = headers_list();
header_remove();
$list4 = headers_list();
var_dump(
$sent1,
$list1,
$list2,
$list3,
$list4,
);
header("Too late !!");
echo "Done\n";
?>
--EXPECTF--
bool(false)
array(1) {
[0]=>
string(%d) "X-Powered-By: PHP/%s"
}
array(2) {
[0]=>
string(%d) "X-Powered-By: PHP/%s"
[1]=>
string(8) "HTTP 1.1"
}
array(3) {
[0]=>
string(%d) "X-Powered-By: PHP/%s"
[1]=>
string(8) "HTTP 1.1"
[2]=>
string(35) "Date: Mon, 25 Mar 1985 00:20:00 GMT"
}
array(0) {
}
Warning: Cannot modify header information - headers already sent by (output started at %s:%d) in %s on line %d
Done