xref: /PHP-8.4/ext/curl/tests/curlopt_private.phpt (revision 39131219)
1--TEST--
2CURLOPT_PRIVATE
3--EXTENSIONS--
4curl
5--FILE--
6<?php
7$curl = curl_init("foobar");
8$obj = new stdClass;
9curl_setopt($curl, CURLOPT_PRIVATE, $obj);
10var_dump($obj === curl_getinfo($curl, CURLINFO_PRIVATE));
11
12$curl2 = curl_copy_handle($curl);
13var_dump($obj === curl_getinfo($curl2, CURLINFO_PRIVATE));
14$obj2 = new stdClass;
15curl_setopt($curl2, CURLOPT_PRIVATE, $obj2);
16var_dump($obj === curl_getinfo($curl, CURLINFO_PRIVATE));
17var_dump($obj2 === curl_getinfo($curl2, CURLINFO_PRIVATE));
18?>
19--EXPECT--
20bool(true)
21bool(true)
22bool(true)
23bool(true)
24