xref: /PHP-7.3/ext/curl/tests/bug52202.phpt (revision 241e340f)
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--EXPECT--
18string(3) "123"
19