xref: /PHP-8.1/ext/curl/tests/curl_basic_022.phpt (revision 74859783)
1--TEST--
2Test curl_getinfo() function with CURLINFO_COOKIELIST parameter
3--EXTENSIONS--
4curl
5--FILE--
6<?php
7
8$ch = curl_init();
9curl_setopt($ch, CURLOPT_COOKIELIST, 'Set-Cookie: C1=v1; expires=Thu, 31-Dec-2037 23:59:59 GMT; path=/; domain=.php.net');
10curl_setopt($ch, CURLOPT_COOKIELIST, 'Set-Cookie: C2=v2; expires=Thu, 31-Dec-2037 23:59:59 GMT; path=/; domain=.php.net');
11var_dump(curl_getinfo($ch, CURLINFO_COOKIELIST));
12
13?>
14--EXPECT--
15array(2) {
16  [0]=>
17  string(38) ".php.net	TRUE	/	FALSE	2145916799	C1	v1"
18  [1]=>
19  string(38) ".php.net	TRUE	/	FALSE	2145916799	C2	v2"
20}
21