xref: /PHP-8.1/ext/posix/posix.stub.php (revision c8f858ef)
1<?php
2
3/** @generate-class-entries */
4
5function posix_kill(int $process_id, int $signal): bool {}
6
7function posix_getpid(): int {}
8
9function posix_getppid(): int {}
10
11function posix_getuid(): int {}
12
13function posix_setuid(int $user_id): bool {}
14
15function posix_geteuid(): int {}
16
17#ifdef HAVE_SETEUID
18function posix_seteuid(int $user_id): bool {}
19#endif
20
21function posix_getgid(): int {}
22
23function posix_setgid(int $group_id): bool {}
24
25function posix_getegid(): int {}
26
27#ifdef HAVE_SETEGID
28function posix_setegid(int $group_id): bool {}
29#endif
30
31#ifdef HAVE_GETGROUPS
32/**
33 * @return array<int, int>|false
34 * @refcount 1
35 */
36function posix_getgroups(): array|false {}
37#endif
38
39#ifdef HAVE_GETLOGIN
40function posix_getlogin(): string|false {}
41#endif
42
43function posix_getpgrp(): int {}
44
45#ifdef HAVE_SETSID
46function posix_setsid(): int {}
47#endif
48
49function posix_setpgid(int $process_id, int $process_group_id): bool {}
50
51#ifdef HAVE_GETPGID
52function posix_getpgid(int $process_id): int|false {}
53#endif
54
55#ifdef HAVE_GETSID
56function posix_getsid(int $process_id): int|false {}
57#endif
58
59/**
60 * @return array<string, string>|false
61 * @refcount 1
62 */
63function posix_uname(): array|false {}
64
65/**
66 * @return array<string, int>|false
67 * @refcount 1
68 */
69function posix_times(): array|false {}
70
71
72#ifdef HAVE_CTERMID
73function posix_ctermid(): string|false {}
74#endif
75
76/** @param resource|int $file_descriptor */
77function posix_ttyname($file_descriptor): string|false {}
78
79/** @param resource|int $file_descriptor */
80function posix_isatty($file_descriptor): bool {}
81
82function posix_getcwd(): string|false {}
83
84#ifdef HAVE_MKFIFO
85function posix_mkfifo(string $filename, int $permissions): bool {}
86#endif
87
88#ifdef HAVE_MKNOD
89function posix_mknod(string $filename, int $flags, int $major = 0, int $minor = 0): bool {}
90#endif
91
92function posix_access(string $filename, int $flags = 0): bool {}
93
94/**
95 * @return array<string, int|string|array|null>|false
96 * @refcount 1
97 */
98function posix_getgrnam(string $name): array|false {}
99
100/**
101 * @return array<string, int|string|array|null>|false
102 * @refcount 1
103 */
104function posix_getgrgid(int $group_id): array|false {}
105
106/**
107 * @return array<string, int|string>|false
108 * @refcount 1
109 */
110function posix_getpwnam(string $username): array|false {}
111
112/**
113 * @return array<string, int|string>|false
114 * @refcount 1
115 */
116function posix_getpwuid(int $user_id): array|false {}
117
118#ifdef HAVE_GETRLIMIT
119/**
120 * @return array<string, int|string>|false
121 * @refcount 1
122 */
123function posix_getrlimit(): array|false {}
124#endif
125
126#ifdef HAVE_SETRLIMIT
127function posix_setrlimit(int $resource, int $soft_limit, int $hard_limit): bool {}
128#endif
129
130function posix_get_last_error(): int {}
131
132/** @alias posix_get_last_error */
133function posix_errno(): int {}
134
135function posix_strerror(int $error_code): string {}
136
137#ifdef HAVE_INITGROUPS
138function posix_initgroups(string $username, int $group_id): bool {}
139#endif
140