xref: /PHP-8.2/sapi/cgi/tests/bug61605.phpt (revision 7aacc705)
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?>
22--EXPECTF--
23Array
24(
25    [0] => X-Powered-By: %s
26    [1] => A: second
27)
28Array
29(
30    [0] => X-Powered-By: %s
31    [1] => A: second
32    [2] => A: third
33)
34Array
35(
36    [0] => X-Powered-By: %s
37)
38