xref: /PHP-8.1/ext/curl/curl.stub.php (revision 17ccabc6)
1<?php
2
3/** @generate-class-entries */
4
5/**
6 * @strict-properties
7 * @not-serializable
8 */
9final class CurlHandle
10{
11}
12
13/**
14 * @strict-properties
15 * @not-serializable
16 */
17final class CurlMultiHandle
18{
19}
20
21/**
22 * @strict-properties
23 * @not-serializable
24 */
25final class CurlShareHandle
26{
27}
28
29function curl_close(CurlHandle $handle): void {}
30
31/** @refcount 1 */
32function curl_copy_handle(CurlHandle $handle): CurlHandle|false {}
33
34function curl_errno(CurlHandle $handle): int {}
35
36/** @refcount 1 */
37function curl_error(CurlHandle $handle): string {}
38
39/** @refcount 1 */
40function curl_escape(CurlHandle $handle, string $string): string|false {}
41
42/** @refcount 1 */
43function curl_unescape(CurlHandle $handle, string $string): string|false {}
44
45function curl_multi_setopt(CurlMultiHandle $multi_handle, int $option, mixed $value): bool {}
46
47function curl_exec(CurlHandle $handle): string|bool {}
48
49/** @refcount 1 */
50function curl_file_create(string $filename, ?string $mime_type = null, ?string $posted_filename = null): CURLFile {}
51
52function curl_getinfo(CurlHandle $handle, ?int $option = null): mixed {}
53
54/** @refcount 1 */
55function curl_init(?string $url = null): CurlHandle|false {}
56
57function curl_multi_add_handle(CurlMultiHandle $multi_handle, CurlHandle $handle): int {}
58
59function curl_multi_close(CurlMultiHandle $multi_handle): void {}
60
61function curl_multi_errno(CurlMultiHandle $multi_handle): int {}
62
63/** @param int $still_running */
64function curl_multi_exec(CurlMultiHandle $multi_handle, &$still_running): int {}
65
66function curl_multi_getcontent(CurlHandle $handle): ?string {}
67
68/**
69 * @param int $queued_messages
70 * @return array<string, int|object>|false
71 * @refcount 1
72 */
73function curl_multi_info_read(CurlMultiHandle $multi_handle, &$queued_messages = null): array|false {}
74
75/** @refcount 1 */
76function curl_multi_init(): CurlMultiHandle {}
77
78function curl_multi_remove_handle(CurlMultiHandle $multi_handle, CurlHandle $handle): int {}
79
80function curl_multi_select(CurlMultiHandle $multi_handle, float $timeout = 1.0): int {}
81
82/** @refcount 1 */
83function curl_multi_strerror(int $error_code): ?string {}
84
85function curl_pause(CurlHandle $handle, int $flags): int {}
86
87function curl_reset(CurlHandle $handle): void {}
88
89function curl_setopt_array(CurlHandle $handle, array $options): bool {}
90
91function curl_setopt(CurlHandle $handle, int $option, mixed $value): bool {}
92
93function curl_share_close(CurlShareHandle $share_handle): void {}
94
95function curl_share_errno(CurlShareHandle $share_handle): int {}
96
97/** @refcount 1 */
98function curl_share_init(): CurlShareHandle {}
99
100function curl_share_setopt(CurlShareHandle $share_handle, int $option, mixed $value): bool {}
101
102/** @refcount 1 */
103function curl_share_strerror(int $error_code): ?string {}
104
105/** @refcount 1 */
106function curl_strerror(int $error_code): ?string {}
107
108/**
109 * @return array<string, int|string|array>|false
110 * @refcount 1
111 */
112function curl_version(): array|false {}
113