xref: /PHP-7.0/sapi/cgi/tests/bug61605.phpt (revision 3b080826)
1--TEST--
2Bug #61605 (header_remove() does not remove all headers)
3--SKIPIF--
4<?php include "skipif.inc"; ?>
5--GET--
6foo=bar
7--INI--
8expose_php=On
9--FILE--
10<?php
11header("A: first");
12header("A: second", TRUE);
13$headers1 = headers_list();
14header("A: third", FALSE);
15$headers2 = headers_list();
16header_remove("A");
17$headers3 = headers_list();
18print_r($headers1);
19print_r($headers2);
20print_r($headers3);
21--EXPECTF--
22Array
23(
24    [0] => X-Powered-By: %s
25    [1] => A: second
26)
27Array
28(
29    [0] => X-Powered-By: %s
30    [1] => A: second
31    [2] => A: third
32)
33Array
34(
35    [0] => X-Powered-By: %s
36)
37