xref: /PHP-8.2/ext/posix/posix.stub.php (revision 17f3631d)
1<?php
2
3/** @generate-class-entries */
4
5/**
6 * @var int
7 * @cvalue F_OK
8 */
9const POSIX_F_OK = UNKNOWN;
10/**
11 * @var int
12 * @cvalue X_OK
13 */
14const POSIX_X_OK = UNKNOWN;
15/**
16 * @var int
17 * @cvalue W_OK
18 */
19const POSIX_W_OK = UNKNOWN;
20/**
21 * @var int
22 * @cvalue R_OK
23 */
24const POSIX_R_OK = UNKNOWN;
25
26#ifdef S_IFREG
27/**
28 * @var int
29 * @cvalue S_IFREG
30 */
31const POSIX_S_IFREG = UNKNOWN;
32#endif
33#ifdef S_IFCHR
34/**
35 * @var int
36 * @cvalue S_IFCHR
37 */
38const POSIX_S_IFCHR = UNKNOWN;
39#endif
40#ifdef S_IFBLK
41/**
42 * @var int
43 * @cvalue S_IFBLK
44 */
45const POSIX_S_IFBLK = UNKNOWN;
46#endif
47#ifdef S_IFIFO
48/**
49 * @var int
50 * @cvalue S_IFIFO
51 */
52const POSIX_S_IFIFO = UNKNOWN;
53#endif
54#ifdef S_IFSOCK
55/**
56 * @var int
57 * @cvalue S_IFSOCK
58 */
59const POSIX_S_IFSOCK = UNKNOWN;
60#endif
61#ifdef RLIMIT_AS
62/**
63 * @var int
64 * @cvalue RLIMIT_AS
65 */
66const POSIX_RLIMIT_AS = UNKNOWN;
67#endif
68#ifdef RLIMIT_CORE
69/**
70 * @var int
71 * @cvalue RLIMIT_CORE
72 */
73const POSIX_RLIMIT_CORE = UNKNOWN;
74#endif
75#ifdef RLIMIT_CPU
76/**
77 * @var int
78 * @cvalue RLIMIT_CPU
79 */
80const POSIX_RLIMIT_CPU = UNKNOWN;
81#endif
82#ifdef RLIMIT_DATA
83/**
84 * @var int
85 * @cvalue RLIMIT_DATA
86 */
87const POSIX_RLIMIT_DATA = UNKNOWN;
88#endif
89#ifdef RLIMIT_FSIZE
90/**
91 * @var int
92 * @cvalue RLIMIT_FSIZE
93 */
94const POSIX_RLIMIT_FSIZE = UNKNOWN;
95#endif
96#ifdef RLIMIT_LOCKS
97/**
98 * @var int
99 * @cvalue RLIMIT_LOCKS
100 */
101const POSIX_RLIMIT_LOCKS = UNKNOWN;
102#endif
103#ifdef RLIMIT_MEMLOCK
104/**
105 * @var int
106 * @cvalue RLIMIT_MEMLOCK
107 */
108const POSIX_RLIMIT_MEMLOCK = UNKNOWN;
109#endif
110#ifdef RLIMIT_MSGQUEUE
111/**
112 * @var int
113 * @cvalue RLIMIT_MSGQUEUE
114 */
115const POSIX_RLIMIT_MSGQUEUE = UNKNOWN;
116#endif
117#ifdef RLIMIT_NICE
118/**
119 * @var int
120 * @cvalue RLIMIT_NICE
121 */
122const POSIX_RLIMIT_NICE = UNKNOWN;
123#endif
124#ifdef RLIMIT_NOFILE
125/**
126 * @var int
127 * @cvalue RLIMIT_NOFILE
128 */
129const POSIX_RLIMIT_NOFILE = UNKNOWN;
130#endif
131#ifdef RLIMIT_NPROC
132/**
133 * @var int
134 * @cvalue RLIMIT_NPROC
135 */
136const POSIX_RLIMIT_NPROC = UNKNOWN;
137#endif
138#ifdef RLIMIT_RSS
139/**
140 * @var int
141 * @cvalue RLIMIT_RSS
142 */
143const POSIX_RLIMIT_RSS = UNKNOWN;
144#endif
145#ifdef RLIMIT_RTPRIO
146/**
147 * @var int
148 * @cvalue RLIMIT_RTPRIO
149 */
150const POSIX_RLIMIT_RTPRIO = UNKNOWN;
151#endif
152#ifdef RLIMIT_RTTIME
153/**
154 * @var int
155 * @cvalue RLIMIT_RTTIME
156 */
157const POSIX_RLIMIT_RTTIME = UNKNOWN;
158#endif
159#ifdef RLIMIT_SIGPENDING
160/**
161 * @var int
162 * @cvalue RLIMIT_SIGPENDING
163 */
164const POSIX_RLIMIT_SIGPENDING = UNKNOWN;
165#endif
166#ifdef RLIMIT_STACK
167/**
168 * @var int
169 * @cvalue RLIMIT_STACK
170 */
171const POSIX_RLIMIT_STACK = UNKNOWN;
172#endif
173#ifdef RLIMIT_KQUEUES
174/**
175 * @var int
176 * @cvalue RLIMIT_KQUEUES
177 */
178const POSIX_RLIMIT_KQUEUES = UNKNOWN;
179#endif
180#ifdef RLIMIT_NPTS
181/**
182 * @var int
183 * @cvalue RLIMIT_NPTS
184 */
185const POSIX_RLIMIT_NPTS = UNKNOWN;
186#endif
187#ifdef HAVE_SETRLIMIT
188/**
189 * @var int
190 * @cvalue RLIM_INFINITY
191 */
192const POSIX_RLIMIT_INFINITY = UNKNOWN;
193#endif
194
195function posix_kill(int $process_id, int $signal): bool {}
196
197function posix_getpid(): int {}
198
199function posix_getppid(): int {}
200
201function posix_getuid(): int {}
202
203function posix_setuid(int $user_id): bool {}
204
205function posix_geteuid(): int {}
206
207#ifdef HAVE_SETEUID
208function posix_seteuid(int $user_id): bool {}
209#endif
210
211function posix_getgid(): int {}
212
213function posix_setgid(int $group_id): bool {}
214
215function posix_getegid(): int {}
216
217#ifdef HAVE_SETEGID
218function posix_setegid(int $group_id): bool {}
219#endif
220
221#ifdef HAVE_GETGROUPS
222/**
223 * @return array<int, int>|false
224 * @refcount 1
225 */
226function posix_getgroups(): array|false {}
227#endif
228
229#ifdef HAVE_GETLOGIN
230function posix_getlogin(): string|false {}
231#endif
232
233function posix_getpgrp(): int {}
234
235#ifdef HAVE_SETSID
236function posix_setsid(): int {}
237#endif
238
239function posix_setpgid(int $process_id, int $process_group_id): bool {}
240
241#ifdef HAVE_GETPGID
242function posix_getpgid(int $process_id): int|false {}
243#endif
244
245#ifdef HAVE_GETSID
246function posix_getsid(int $process_id): int|false {}
247#endif
248
249/**
250 * @return array<string, string>|false
251 * @refcount 1
252 */
253function posix_uname(): array|false {}
254
255/**
256 * @return array<string, int>|false
257 * @refcount 1
258 */
259function posix_times(): array|false {}
260
261
262#ifdef HAVE_CTERMID
263function posix_ctermid(): string|false {}
264#endif
265
266/** @param resource|int $file_descriptor */
267function posix_ttyname($file_descriptor): string|false {}
268
269/** @param resource|int $file_descriptor */
270function posix_isatty($file_descriptor): bool {}
271
272function posix_getcwd(): string|false {}
273
274#ifdef HAVE_MKFIFO
275function posix_mkfifo(string $filename, int $permissions): bool {}
276#endif
277
278#ifdef HAVE_MKNOD
279function posix_mknod(string $filename, int $flags, int $major = 0, int $minor = 0): bool {}
280#endif
281
282function posix_access(string $filename, int $flags = 0): bool {}
283
284/**
285 * @return array<string, int|string|array|null>|false
286 * @refcount 1
287 */
288function posix_getgrnam(string $name): array|false {}
289
290/**
291 * @return array<string, int|string|array|null>|false
292 * @refcount 1
293 */
294function posix_getgrgid(int $group_id): array|false {}
295
296/**
297 * @return array<string, int|string>|false
298 * @refcount 1
299 */
300function posix_getpwnam(string $username): array|false {}
301
302/**
303 * @return array<string, int|string>|false
304 * @refcount 1
305 */
306function posix_getpwuid(int $user_id): array|false {}
307
308#ifdef HAVE_GETRLIMIT
309/**
310 * @return array<string, int|string>|false
311 * @refcount 1
312 */
313function posix_getrlimit(): array|false {}
314#endif
315
316#ifdef HAVE_SETRLIMIT
317function posix_setrlimit(int $resource, int $soft_limit, int $hard_limit): bool {}
318#endif
319
320function posix_get_last_error(): int {}
321
322/** @alias posix_get_last_error */
323function posix_errno(): int {}
324
325function posix_strerror(int $error_code): string {}
326
327#ifdef HAVE_INITGROUPS
328function posix_initgroups(string $username, int $group_id): bool {}
329#endif
330