1--TEST--
2curl_share_setopt basic test
3--EXTENSIONS--
4curl
5--FILE--
6<?php
7
8$sh = curl_share_init();
9var_dump(curl_share_setopt($sh, CURLSHOPT_SHARE, CURL_LOCK_DATA_COOKIE));
10var_dump(curl_share_setopt($sh, CURLSHOPT_UNSHARE, CURL_LOCK_DATA_DNS));
11
12try {
13    curl_share_setopt($sh, -1, 0);
14} catch (ValueError $e) {
15    echo $e->getMessage(), "\n";
16}
17
18?>
19--EXPECT--
20bool(true)
21bool(true)
22curl_share_setopt(): Argument #2 ($option) is not a valid cURL share option
23