xref: /PHP-8.0/ext/curl/tests/bug52202.phpt (revision 7aacc705)
1--TEST--
2Bug #52202 (CURLOPT_PRIVATE gets clobbered)
3--SKIPIF--
4<?php
5if (!extension_loaded('curl')) exit("skip curl extension not loaded");
6?>
7--FILE--
8<?php
9$curl = curl_init("http://www.google.com");
10curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
11curl_setopt($curl, CURLOPT_PRIVATE, "123");
12curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 1);
13curl_setopt($curl, CURLOPT_TIMEOUT, 1);
14curl_exec($curl);
15
16var_dump(curl_getinfo($curl, CURLINFO_PRIVATE));
17?>
18--EXPECT--
19string(3) "123"
20