1<?php
2
3/** @generate-function-entries */
4
5/* main/main.c */
6
7function set_time_limit(int $seconds): bool {}
8
9/* main/SAPI.c */
10
11function header_register_callback(callable $callback): bool {}
12
13/* main/output.c */
14
15/** @param callable $callback */
16function ob_start($callback = null, int $chunk_size = 0, int $flags = PHP_OUTPUT_HANDLER_STDFLAGS): bool {}
17
18function ob_flush(): bool {}
19
20function ob_clean(): bool {}
21
22function ob_end_flush(): bool {}
23
24function ob_end_clean(): bool {}
25
26function ob_get_flush(): string|false {}
27
28function ob_get_clean(): string|false {}
29
30function ob_get_contents(): string|false {}
31
32function ob_get_level(): int {}
33
34function ob_get_length(): int|false {}
35
36function ob_list_handlers(): array {}
37
38function ob_get_status(bool $full_status = false): array {}
39
40function ob_implicit_flush(bool $enable = true): void {}
41
42function output_reset_rewrite_vars(): bool {}
43
44function output_add_rewrite_var(string $name, string $value): bool {}
45
46/* main/streams/userspace.c */
47
48function stream_wrapper_register(string $protocol, string $class, int $flags = 0): bool {}
49
50/** @alias stream_wrapper_register */
51function stream_register_wrapper(string $protocol, string $class, int $flags = 0): bool {}
52
53function stream_wrapper_unregister(string $protocol): bool {}
54
55function stream_wrapper_restore(string $protocol): bool {}
56
57/* array.c */
58
59function array_push(array &$array, mixed ...$values): int {}
60
61function krsort(array &$array, int $flags = SORT_REGULAR): bool {}
62
63function ksort(array &$array, int $flags = SORT_REGULAR): bool {}
64
65function count(Countable|array $value, int $mode = COUNT_NORMAL): int {}
66
67/** @alias count */
68function sizeof(Countable|array $value, int $mode = COUNT_NORMAL): int {}
69
70function natsort(array &$array): bool {}
71
72function natcasesort(array &$array): bool {}
73
74function asort(array &$array, int $flags = SORT_REGULAR): bool {}
75
76function arsort(array &$array, int $flags = SORT_REGULAR): bool {}
77
78function sort(array &$array, int $flags = SORT_REGULAR): bool {}
79
80function rsort(array &$array, int $flags = SORT_REGULAR): bool {}
81
82function usort(array &$array, callable $callback): bool {}
83
84function uasort(array &$array, callable $callback): bool {}
85
86function uksort(array &$array, callable $callback): bool {}
87
88function end(array|object &$array): mixed {}
89
90function prev(array|object &$array): mixed {}
91
92function next(array|object &$array): mixed {}
93
94function reset(array|object &$array): mixed {}
95
96function current(array|object $array): mixed {}
97
98/** @alias current */
99function pos(array|object $array): mixed {}
100
101function key(array|object $array): int|string|null {}
102
103function min(mixed $value, mixed ...$values): mixed {}
104
105function max(mixed $value, mixed ...$values): mixed {}
106
107function array_walk(array|object &$array, callable $callback, mixed $arg = UNKNOWN): bool {}
108
109function array_walk_recursive(array|object &$array, callable $callback, mixed $arg = UNKNOWN): bool {}
110
111function in_array(mixed $needle, array $haystack, bool $strict = false): bool {}
112
113function array_search(mixed $needle, array $haystack, bool $strict = false): int|string|false {}
114
115/** @prefer-ref $array */
116function extract(array &$array, int $flags = EXTR_OVERWRITE, string $prefix = ""): int {}
117
118/**
119 * @param array|string $var_name
120 * @param array|string $var_names
121 */
122function compact($var_name, ...$var_names): array {}
123
124function array_fill(int $start_index, int $count, mixed $value): array {}
125
126function array_fill_keys(array $keys, mixed $value): array {}
127
128/**
129 * @param string|int|float $start
130 * @param string|int|float $end
131 */
132function range($start, $end, int|float $step = 1): array {}
133
134function shuffle(array &$array): bool {}
135
136function array_pop(array &$array): mixed {}
137
138function array_shift(array &$array): mixed {}
139
140function array_unshift(array &$array, mixed ...$values): int {}
141
142function array_splice(array &$array, int $offset, ?int $length = null, mixed $replacement = []): array {}
143
144function array_slice(array $array, int $offset, ?int $length = null, bool $preserve_keys = false): array {}
145
146function array_merge(array ...$arrays): array {}
147
148function array_merge_recursive(array ...$arrays): array {}
149
150function array_replace(array $array, array ...$replacements): array {}
151
152function array_replace_recursive(array $array, array ...$replacements): array {}
153
154function array_keys(array $array, mixed $filter_value = UNKNOWN, bool $strict = false): array {}
155
156function array_key_first(array $array): int|string|null {}
157
158function array_key_last(array $array): int|string|null {}
159
160function array_values(array $array): array {}
161
162function array_count_values(array $array): array {}
163
164function array_column(array $array, int|string|null $column_key, int|string|null $index_key = null): array {}
165
166function array_reverse(array $array, bool $preserve_keys = false): array {}
167
168function array_pad(array $array, int $length, mixed $value): array {}
169
170function array_flip(array $array): array {}
171
172function array_change_key_case(array $array, int $case = CASE_LOWER): array {}
173
174function array_unique(array $array, int $flags = SORT_STRING): array {}
175
176function array_intersect_key(array $array, array ...$arrays): array {}
177
178/** @param array|callable $rest */
179function array_intersect_ukey(array $array, ...$rest): array {}
180
181function array_intersect(array $array, array ...$arrays): array {}
182
183/** @param array|callable $rest */
184function array_uintersect(array $array, ...$rest): array {}
185
186function array_intersect_assoc(array $array, array ...$arrays): array {}
187
188/** @param array|callable $rest */
189function array_uintersect_assoc(array $array, ...$rest): array {}
190
191/** @param array|callable $rest */
192function array_intersect_uassoc(array $array, ...$rest): array {}
193
194/** @param array|callable $rest */
195function array_uintersect_uassoc(array $array, ...$rest): array {}
196
197function array_diff_key(array $array, array ...$arrays): array {}
198
199/** @param array|callable $rest */
200function array_diff_ukey(array $array, ...$rest): array {}
201
202function array_diff(array $array, array ...$arrays): array {}
203
204/** @param array|callable $rest */
205function array_udiff(array $array, ...$rest): array {}
206
207function array_diff_assoc(array $array, array ...$arrays): array {}
208
209/** @param array|callable $rest */
210function array_diff_uassoc(array $array, ...$rest): array {}
211
212/** @param array|callable $rest */
213function array_udiff_assoc(array $array, ...$rest): array {}
214
215/** @param array|callable $rest */
216function array_udiff_uassoc(array $array, ...$rest): array {}
217
218/**
219 * @param array $array
220 * @param array|int $rest
221 * @prefer-ref $array
222 * @prefer-ref $rest
223 */
224function array_multisort(&$array, &...$rest): bool {}
225
226function array_rand(array $array, int $num = 1): int|string|array {}
227
228function array_sum(array $array): int|float {}
229
230function array_product(array $array): int|float {}
231
232function array_reduce(array $array, callable $callback, mixed $initial = null): mixed {}
233
234function array_filter(array $array, ?callable $callback = null, int $mode = 0): array {}
235
236function array_map(?callable $callback, array $array, array ...$arrays): array {}
237
238/** @param string|int $key */
239function array_key_exists($key, array $array): bool {}
240
241/**
242 * @param string|int $key
243 * @alias array_key_exists
244 */
245function key_exists($key, array $array): bool {}
246
247function array_chunk(array $array, int $length, bool $preserve_keys = false): array {}
248
249function array_combine(array $keys, array $values): array {}
250
251/* base64.c */
252
253function base64_encode(string $string): string {}
254
255function base64_decode(string $string, bool $strict = false): string|false {}
256
257/* basic_functions.c */
258
259function constant(string $name): mixed {}
260
261function ip2long(string $ip): int|false {}
262
263function long2ip(int $ip): string|false {}
264
265function getenv(?string $name = null, bool $local_only = false): string|array|false {}
266
267#ifdef HAVE_PUTENV
268function putenv(string $assignment): bool {}
269#endif
270
271/** @param int $rest_index */
272function getopt(string $short_options, array $long_options = [], &$rest_index = null): array|false {}
273
274function flush(): void {}
275
276function sleep(int $seconds): int {}
277
278function usleep(int $microseconds): void {}
279
280#if HAVE_NANOSLEEP
281function time_nanosleep(int $seconds, int $nanoseconds): array|bool {}
282
283function time_sleep_until(float $timestamp): bool {}
284#endif
285
286function get_current_user(): string {}
287
288function get_cfg_var(string $option): string|array|false {}
289
290function error_log(string $message, int $message_type = 0, ?string $destination = null, ?string $additional_headers = null): bool {}
291
292function error_get_last(): ?array {}
293
294function error_clear_last(): void {}
295
296function call_user_func(callable $callback, mixed ...$args): mixed {}
297
298function call_user_func_array(callable $callback, array $args): mixed {}
299
300function forward_static_call(callable $callback, mixed ...$args): mixed {}
301
302function forward_static_call_array(callable $callback, array $args): mixed {}
303
304function register_shutdown_function(callable $callback, mixed ...$args): ?bool {}
305
306function highlight_file(string $filename, bool $return = false): string|bool {}
307
308/** @alias highlight_file */
309function show_source(string $filename, bool $return = false): string|bool {}
310
311function php_strip_whitespace(string $filename): string {}
312
313function highlight_string(string $string, bool $return = false): string|bool {}
314
315function ini_get(string $option): string|false {}
316
317function ini_get_all(?string $extension = null, bool $details = true): array|false {}
318
319function ini_set(string $option, string $value): string|false {}
320
321/** @alias ini_set */
322function ini_alter(string $option, string $value): string|false {}
323
324function ini_restore(string $option): void {}
325
326function set_include_path(string $include_path): string|false {}
327
328function get_include_path(): string|false {}
329
330function print_r(mixed $value, bool $return = false): string|bool {}
331
332function connection_aborted(): int {}
333
334function connection_status(): int {}
335
336function ignore_user_abort(?bool $enable = null): int {}
337
338#if HAVE_GETSERVBYNAME
339function getservbyname(string $service, string $protocol): int|false {}
340#endif
341
342#if HAVE_GETSERVBYPORT
343function getservbyport(int $port, string $protocol): string|false {}
344#endif
345
346#if HAVE_GETPROTOBYNAME
347function getprotobyname(string $protocol): int|false {}
348#endif
349
350#if HAVE_GETPROTOBYNUMBER
351function getprotobynumber(int $protocol): string|false {}
352#endif
353
354function register_tick_function(callable $callback, mixed ...$args): bool {}
355
356function unregister_tick_function(callable $callback): void {}
357
358function is_uploaded_file(string $filename): bool {}
359
360function move_uploaded_file(string $from, string $to): bool {}
361
362function parse_ini_file(string $filename, bool $process_sections = false, int $scanner_mode = INI_SCANNER_NORMAL): array|false {}
363
364function parse_ini_string(string $ini_string, bool $process_sections = false, int $scanner_mode = INI_SCANNER_NORMAL): array|false {}
365
366#if ZEND_DEBUG
367function config_get_hash(): array {}
368#endif
369
370#ifdef HAVE_GETLOADAVG
371function sys_getloadavg(): array|false {}
372#endif
373
374/* browscap.c */
375
376function get_browser(?string $user_agent = null, bool $return_array = false): object|array|false {}
377
378/* crc32.c */
379
380function crc32(string $string): int {}
381
382/* crypt.c */
383
384function crypt(string $string, string $salt): string {}
385
386/* datetime.c */
387
388#if HAVE_STRPTIME
389function strptime(string $timestamp, string $format): array|false {}
390#endif
391
392/* dns.c */
393
394#ifdef HAVE_GETHOSTNAME
395function gethostname(): string|false {}
396#endif
397
398function gethostbyaddr(string $ip): string|false {}
399
400function gethostbyname(string $hostname): string {}
401
402function gethostbynamel(string $hostname): array|false {}
403
404#if defined(PHP_WIN32) || HAVE_DNS_SEARCH_FUNC
405function dns_check_record(string $hostname, string $type = "MX"): bool {}
406
407/** @alias dns_check_record */
408function checkdnsrr(string $hostname, string $type = "MX"): bool {}
409
410/**
411 * @param array $authoritative_name_servers
412 * @param array $additional_records
413 */
414function dns_get_record(string $hostname, int $type = DNS_ANY, &$authoritative_name_servers = null, &$additional_records = null, bool $raw = false): array|false {}
415
416/**
417 * @param array $hosts
418 * @param array $weights
419 */
420function dns_get_mx(string $hostname, &$hosts, &$weights = null): bool {}
421
422/**
423 * @param array $hosts
424 * @param array $weights
425 * @alias dns_get_mx
426 */
427function getmxrr(string $hostname, &$hosts, &$weights = null): bool {}
428#endif
429
430/* net.c */
431
432#if defined(PHP_WIN32) || HAVE_GETIFADDRS || defined(__PASE__)
433function net_get_interfaces(): array|false {}
434#endif
435
436/* ftok.c */
437
438#if HAVE_FTOK
439function ftok(string $filename, string $project_id): int {}
440#endif
441
442/* hrtime.c */
443
444function hrtime(bool $as_number = false): array|int|float|false {}
445
446/* lcg.c */
447
448function lcg_value(): float {}
449
450/* md5.c */
451
452function md5(string $string, bool $binary = false): string {}
453
454function md5_file(string $filename, bool $binary = false): string|false {}
455
456/* pageinfo.c */
457
458function getmyuid(): int|false {}
459
460function getmygid(): int|false {}
461
462function getmypid(): int|false {}
463
464function getmyinode(): int|false {}
465
466function getlastmod(): int|false {}
467
468/* sha1.c */
469
470function sha1(string $string, bool $binary = false): string {}
471
472function sha1_file(string $filename, bool $binary = false): string|false {}
473
474/* syslog.c */
475
476#ifdef HAVE_SYSLOG_H
477function openlog(string $prefix, int $flags, int $facility): bool {}
478
479function closelog(): bool {}
480
481function syslog(int $priority, string $message): bool {}
482#endif
483
484#ifdef HAVE_INET_NTOP
485function inet_ntop(string $ip): string|false {}
486#endif
487
488#ifdef HAVE_INET_PTON
489function inet_pton(string $ip): string|false {}
490#endif
491
492/* metaphone.c */
493
494function metaphone(string $string, int $max_phonemes = 0): string {}
495
496/* {{{ head.c */
497function header(string $header, bool $replace = true, int $response_code = 0): void {}
498
499function header_remove(?string $name = null): void {}
500
501function setrawcookie(string $name, string $value = "", array|int $expires_or_options = 0, string $path = "", string $domain = "", bool $secure = false, bool $httponly = false): bool {}
502
503function setcookie(string $name, string $value = "", array|int $expires_or_options = 0, string $path = "", string $domain = "", bool $secure = false, bool $httponly = false): bool {}
504
505function http_response_code(int $response_code = 0): int|bool {}
506
507/**
508 * @param string $filename
509 * @param int $line
510 */
511function headers_sent(&$filename = null, &$line = null): bool {}
512
513function headers_list(): array {}
514
515/* {{{ html.c */
516
517function htmlspecialchars(string $string, int $flags = ENT_COMPAT, ?string $encoding = null, bool $double_encode = true): string {}
518
519function htmlspecialchars_decode(string $string, int $flags = ENT_COMPAT): string {}
520
521function html_entity_decode(string $string, int $flags = ENT_COMPAT, ?string $encoding = null): string {}
522
523function htmlentities(string $string, int $flags = ENT_COMPAT, ?string $encoding = null, bool $double_encode = true): string {}
524
525function get_html_translation_table(int $table = HTML_SPECIALCHARS, int $flags = ENT_COMPAT, string $encoding = "UTF-8"): array {}
526
527/* }}} */
528
529/* assert.c */
530
531function assert(mixed $assertion, Throwable|string|null $description = null): bool {}
532
533function assert_options(int $option, mixed $value = UNKNOWN): mixed {}
534
535/* string.c */
536
537function bin2hex(string $string): string {}
538
539function hex2bin(string $string): string|false {}
540
541function strspn(string $string, string $characters, int $offset = 0, ?int $length = null): int {}
542
543function strcspn(string $string, string $characters, int $offset = 0, ?int $length = null): int {}
544
545#if HAVE_NL_LANGINFO
546function nl_langinfo(int $item): string|false {}
547#endif
548
549function strcoll(string $string1, string $string2): int {}
550
551function trim(string $string, string $characters = " \n\r\t\v\0"): string {}
552
553function rtrim(string $string, string $characters = " \n\r\t\v\0"): string {}
554
555/** @alias rtrim */
556function chop(string $string, string $characters = " \n\r\t\v\0"): string {}
557
558function ltrim(string $string, string $characters = " \n\r\t\v\0"): string {}
559
560function wordwrap(string $string, int $width = 75, string $break = "\n", bool $cut_long_words = false): string {}
561
562function explode(string $separator, string $string, int $limit = PHP_INT_MAX): array {}
563
564function implode(string|array $separator, ?array $array = null): string {}
565
566/** @alias implode */
567function join(string|array $separator, ?array $array = null): string {}
568
569function strtok(string $string, ?string $token = null): string|false {}
570
571function strtoupper(string $string): string {}
572
573function strtolower(string $string): string {}
574
575function basename(string $path, string $suffix = ""): string {}
576
577function dirname(string $path, int $levels = 1): string {}
578
579function pathinfo(string $path, int $flags = PATHINFO_ALL): array|string {}
580
581function stristr(string $haystack, string $needle, bool $before_needle = false): string|false {}
582
583function strstr(string $haystack, string $needle, bool $before_needle = false): string|false {}
584
585/** @alias strstr */
586function strchr(string $haystack, string $needle, bool $before_needle = false): string|false {}
587
588function strpos(string $haystack, string $needle, int $offset = 0): int|false {}
589
590function stripos(string $haystack, string $needle, int $offset = 0): int|false {}
591
592function strrpos(string $haystack, string $needle, int $offset = 0): int|false {}
593
594function strripos(string $haystack, string $needle, int $offset = 0): int|false {}
595
596function strrchr(string $haystack, string $needle): string|false {}
597
598function str_contains(string $haystack, string $needle): bool {}
599
600function str_starts_with(string $haystack, string $needle): bool {}
601
602function str_ends_with(string $haystack, string $needle): bool {}
603
604function chunk_split(string $string, int $length = 76, string $separator = "\r\n"): string {}
605
606function substr(string $string, int $offset, ?int $length = null): string {}
607
608function substr_replace(array|string $string, array|string $replace, array|int $offset, array|int|null $length = null): string|array {}
609
610function quotemeta(string $string): string {}
611
612function ord(string $character): int {}
613
614function chr(int $codepoint): string {}
615
616function ucfirst(string $string): string {}
617
618function lcfirst(string $string): string {}
619
620function ucwords(string $string, string $separators = " \t\r\n\f\v"): string {}
621
622function strtr(string $string, string|array $from, ?string $to = null): string {}
623
624function strrev(string $string): string {}
625
626/** @param float $percent */
627function similar_text(string $string1, string $string2, &$percent = null): int {}
628
629function addcslashes(string $string, string $characters): string {}
630
631function addslashes(string $string): string {}
632
633function stripcslashes(string $string): string {}
634
635function stripslashes(string $string): string {}
636
637/** @param int $count */
638function str_replace(array|string $search, array|string $replace, string|array $subject, &$count = null): string|array {}
639
640/** @param int $count */
641function str_ireplace(array|string $search, array|string $replace, string|array $subject, &$count = null): string|array {}
642
643function hebrev(string $string, int $max_chars_per_line = 0): string {}
644
645function nl2br(string $string, bool $use_xhtml = true): string {}
646
647function strip_tags(string $string, array|string|null $allowed_tags = null): string {}
648
649/**
650 * @param array|string $locales
651 * @param string $rest
652 */
653function setlocale(int $category, $locales, ...$rest): string|false {}
654
655/** @param array $result */
656function parse_str(string $string, &$result): void {}
657
658function str_getcsv(string $string, string $separator = ",", string $enclosure = "\"", string $escape = "\\"): array {}
659
660function str_repeat(string $string, int $times): string {}
661
662function count_chars(string $string, int $mode = 0): array|string {}
663
664function strnatcmp(string $string1, string $string2): int {}
665
666function localeconv(): array {}
667
668function strnatcasecmp(string $string1, string $string2): int {}
669
670function substr_count(string $haystack, string $needle, int $offset = 0, ?int $length = null): int {}
671
672function str_pad(string $string, int $length, string $pad_string = " ", int $pad_type = STR_PAD_RIGHT): string {}
673
674function sscanf(string $string, string $format, mixed &...$vars): array|int|null {}
675
676function str_rot13(string $string): string {}
677
678function str_shuffle(string $string): string {}
679
680function str_word_count(string $string, int $format = 0, ?string $characters = null): array|int {}
681
682function str_split(string $string, int $length = 1): array {}
683
684function strpbrk(string $string, string $characters): string|false {}
685
686function substr_compare(string $haystack, string $needle, int $offset, ?int $length = null, bool $case_insensitive = false): int {}
687
688function utf8_encode(string $string): string {}
689
690function utf8_decode(string $string): string {}
691
692/* dir.c */
693
694/**
695 * @param resource|null $context
696 * @return resource|false
697 */
698function opendir(string $directory, $context = null) {}
699
700/** @param resource|null $context */
701function dir(string $directory, $context = null): Directory|false {}
702
703/** @param resource|null $dir_handle */
704function closedir($dir_handle = null): void {}
705
706function chdir(string $directory): bool {}
707
708#if defined(HAVE_CHROOT) && !defined(ZTS) && ENABLE_CHROOT_FUNC
709function chroot(string $directory): bool {}
710#endif
711
712function getcwd(): string|false {}
713
714/** @param resource|null $dir_handle */
715function rewinddir($dir_handle = null): void {}
716
717/** @param resource|null $dir_handle */
718function readdir($dir_handle = null): string|false {}
719
720/** @param resource|null $context */
721function scandir(string $directory, int $sorting_order = SCANDIR_SORT_ASCENDING, $context = null): array|false {}
722
723#ifdef HAVE_GLOB
724function glob(string $pattern, int $flags = 0): array|false {}
725#endif
726
727/* exec.c */
728
729/**
730 * @param array $output
731 * @param int $result_code
732 */
733function exec(string $command, &$output = null, &$result_code = null): string|false {}
734
735/** @param int $result_code */
736function system(string $command, &$result_code = null): string|false {}
737
738/** @param int $result_code */
739function passthru(string $command, &$result_code = null): ?bool {}
740
741function escapeshellcmd(string $command): string {}
742
743function escapeshellarg(string $arg): string {}
744
745function shell_exec(string $command): string|false|null {}
746
747#ifdef HAVE_NICE
748function proc_nice(int $priority): bool {}
749#endif
750
751/* file.c */
752
753/**
754 * @param resource $stream
755 * @param int $would_block
756 */
757function flock($stream, int $operation, &$would_block = null): bool {}
758
759function get_meta_tags(string $filename, bool $use_include_path = false): array|false {}
760
761/** @param resource $handle */
762function pclose($handle): int {}
763
764/** @return resource|false */
765function popen(string $command, string $mode) {}
766
767/** @param resource|null $context */
768function readfile(string $filename, bool $use_include_path = false, $context = null): int|false {}
769
770/** @param resource $stream */
771function rewind($stream): bool {}
772
773/** @param resource|null $context */
774function rmdir(string $directory, $context = null): bool {}
775
776function umask(?int $mask = null): int {}
777
778/** @param resource $stream */
779function fclose($stream): bool {}
780
781/** @param resource $stream */
782function feof($stream): bool {}
783
784/** @param resource $stream */
785function fgetc($stream): string|false {}
786
787/** @param resource $stream */
788function fgets($stream, ?int $length = null): string|false {}
789
790/** @param resource $stream */
791function fread($stream, int $length): string|false {}
792
793/**
794 * @param resource|null $context
795 * @return resource|false
796 */
797function fopen(string $filename, string $mode, bool $use_include_path = false, $context = null) {}
798
799/** @param resource $stream */
800function fscanf($stream, string $format, mixed &...$vars): array|int|false|null {}
801
802/** @param resource $stream */
803function fpassthru($stream): int {}
804
805/** @param resource $stream */
806function ftruncate($stream, int $size): bool {}
807
808/** @param resource $stream */
809function fstat($stream): array|false {}
810
811/** @param resource $stream */
812function fseek($stream, int $offset, int $whence = SEEK_SET): int {}
813
814/** @param resource $stream */
815function ftell($stream): int|false {}
816
817/** @param resource $stream */
818function fflush($stream): bool {}
819
820/** @param resource $stream */
821function fwrite($stream, string $data, ?int $length = null): int|false {}
822
823/**
824 * @param resource $stream
825 * @alias fwrite
826 */
827function fputs($stream, string $data, ?int $length = null): int|false {}
828
829/** @param resource|null $context */
830function mkdir(string $directory, int $permissions = 0777, bool $recursive = false, $context = null): bool {}
831
832/** @param resource|null $context */
833function rename(string $from, string $to, $context = null): bool {}
834
835/** @param resource|null $context */
836function copy(string $from, string $to, $context = null): bool {}
837
838function tempnam(string $directory, string $prefix): string|false {}
839
840/** @return resource|false */
841function tmpfile() {}
842
843/** @param resource|null $context */
844function file(string $filename, int $flags = 0, $context = null): array|false {}
845
846/** @param resource|null $context */
847function file_get_contents(string $filename, bool $use_include_path = false, $context = null, int $offset = 0, ?int $length = null): string|false {}
848
849/** @param resource|null $context */
850function unlink(string $filename, $context = null): bool {}
851
852/** @param resource|null $context */
853function file_put_contents(string $filename, mixed $data, int $flags = 0, $context = null): int|false {}
854
855/** @param resource $stream */
856function fputcsv($stream, array $fields, string $separator = ",", string $enclosure = "\"", string $escape = "\\"): int|false {}
857
858/** @param resource $stream */
859function fgetcsv($stream, ?int $length = null, string $separator = ",", string $enclosure = "\"", string $escape = "\\"): array|false {}
860
861function realpath(string $path): string|false {}
862
863#ifdef HAVE_FNMATCH
864function fnmatch(string $pattern, string $filename, int $flags = 0): bool {}
865#endif
866
867function sys_get_temp_dir(): string {}
868
869/* filestat.c */
870
871function fileatime(string $filename): int|false {}
872
873function filectime(string $filename): int|false {}
874
875function filegroup(string $filename): int|false {}
876
877function fileinode(string $filename): int|false {}
878
879function filemtime(string $filename): int|false {}
880
881function fileowner(string $filename): int|false {}
882
883function fileperms(string $filename): int|false {}
884
885function filesize(string $filename): int|false {}
886
887function filetype(string $filename): string|false {}
888
889function file_exists(string $filename): bool {}
890
891function is_writable(string $filename): bool {}
892
893/** @alias is_writable */
894function is_writeable(string $filename): bool {}
895
896function is_readable(string $filename): bool {}
897
898function is_executable(string $filename): bool {}
899
900function is_file(string $filename): bool {}
901
902function is_dir(string $filename): bool {}
903
904function is_link(string $filename): bool {}
905
906function stat(string $filename): array|false {}
907
908function lstat(string $filename): array|false {}
909
910function chown(string $filename, string|int $user): bool {}
911
912function chgrp(string $filename, string|int $group): bool {}
913
914#if HAVE_LCHOWN
915function lchown(string $filename, string|int $user): bool {}
916
917function lchgrp(string $filename, string|int $group): bool {}
918#endif
919
920function chmod(string $filename, int $permissions): bool {}
921
922#if HAVE_UTIME
923function touch(string $filename, ?int $mtime = null, ?int $atime = null): bool {}
924#endif
925
926function clearstatcache(bool $clear_realpath_cache = false, string $filename = ""): void {}
927
928function disk_total_space(string $directory): float|false {}
929
930function disk_free_space(string $directory): float|false {}
931
932/** @alias disk_free_space */
933function diskfreespace(string $directory): float|false {}
934
935function realpath_cache_get(): array {}
936
937function realpath_cache_size(): int {}
938
939/* formatted_print.c */
940
941function sprintf(string $format, mixed ...$values): string {}
942
943function printf(string $format, mixed ...$values): int {}
944
945function vprintf(string $format, array $values): int {}
946
947function vsprintf(string $format, array $values): string {}
948
949/** @param resource $stream */
950function fprintf($stream, string $format, mixed ...$values): int {}
951
952/** @param resource $stream */
953function vfprintf($stream, string $format, array $values): int {}
954
955/* fsock.c */
956
957/**
958 * @param int $error_code
959 * @param string $error_message
960 * @return resource|false
961 */
962function fsockopen(string $hostname, int $port = -1, &$error_code = null, &$error_message = null, ?float $timeout = null) {}
963
964/**
965 * @param int $error_code
966 * @param string $error_message
967 * @return resource|false
968 */
969function pfsockopen(string $hostname, int $port = -1, &$error_code = null, &$error_message = null, ?float $timeout = null) {}
970
971/* http.c */
972
973function http_build_query(array|object $data, string $numeric_prefix = "", ?string $arg_separator = null, int $encoding_type = PHP_QUERY_RFC1738): string {}
974
975/* image.c */
976
977function image_type_to_mime_type(int $image_type): string {}
978
979function image_type_to_extension(int $image_type, bool $include_dot = true): string|false {}
980
981/** @param array $image_info */
982function getimagesize(string $filename, &$image_info = null): array|false {}
983
984/** @param array $image_info */
985function getimagesizefromstring(string $string, &$image_info = null): array|false {}
986
987/* info.c */
988
989function phpinfo(int $flags = INFO_ALL): bool {}
990
991function phpversion(?string $extension = null): string|false {}
992
993function phpcredits(int $flags = CREDITS_ALL): bool {}
994
995function php_sapi_name(): string|false {}
996
997function php_uname(string $mode = "a"): string {}
998
999function php_ini_scanned_files(): string|false {}
1000
1001function php_ini_loaded_file(): string|false {}
1002
1003/* iptc.c */
1004
1005function iptcembed(string $iptc_data, string $filename, int $spool = 0): string|bool {}
1006
1007function iptcparse(string $iptc_block): array|false {}
1008
1009/* levenshtein.c */
1010
1011function levenshtein(string $string1, string $string2, int $insertion_cost = 1, int $replacement_cost = 1, int $deletion_cost = 1): int {}
1012
1013/* link.c */
1014
1015#if defined(HAVE_SYMLINK) || defined(PHP_WIN32)
1016function readlink(string $path): string|false {}
1017
1018function linkinfo(string $path): int|false {}
1019
1020function symlink(string $target, string $link): bool {}
1021
1022function link(string $target, string $link): bool {}
1023#endif
1024
1025/* mail.c */
1026
1027function mail(string $to, string $subject, string $message, array|string $additional_headers = [], string $additional_params = ""): bool {}
1028
1029/* math.c */
1030
1031function abs(int|float $num): int|float {}
1032
1033function ceil(int|float $num): float {}
1034
1035function floor(int|float $num): float {}
1036
1037function round(int|float $num, int $precision = 0, int $mode = PHP_ROUND_HALF_UP): float {}
1038
1039function sin(float $num): float {}
1040
1041function cos(float $num): float {}
1042
1043function tan(float $num): float {}
1044
1045function asin(float $num): float {}
1046
1047function acos(float $num): float {}
1048
1049function atan(float $num): float {}
1050
1051function atanh(float $num): float {}
1052
1053function atan2(float $y, float $x): float {}
1054
1055function sinh(float $num): float {}
1056
1057function cosh(float $num): float {}
1058
1059function tanh(float $num): float {}
1060
1061function asinh(float $num): float {}
1062
1063function acosh(float $num): float {}
1064
1065function expm1(float $num): float {}
1066
1067function log1p(float $num): float {}
1068
1069function pi(): float {}
1070
1071function is_finite(float $num): bool {}
1072
1073function is_nan(float $num): bool {}
1074
1075function intdiv(int $num1, int $num2): int {}
1076
1077function is_infinite(float $num): bool {}
1078
1079function pow(mixed $num, mixed $exponent): int|float|object {}
1080
1081function exp(float $num): float {}
1082
1083function log(float $num, float $base = M_E): float {}
1084
1085function log10(float $num): float {}
1086
1087function sqrt(float $num): float {}
1088
1089function hypot(float $x, float $y): float {}
1090
1091function deg2rad(float $num): float {}
1092
1093function rad2deg(float $num): float {}
1094
1095function bindec(string $binary_string): int|float {}
1096
1097function hexdec(string $hex_string): int|float {}
1098
1099function octdec(string $octal_string): int|float {}
1100
1101function decbin(int $num): string {}
1102
1103function decoct(int $num): string {}
1104
1105function dechex(int $num): string {}
1106
1107function base_convert(string $num, int $from_base, int $to_base): string {}
1108
1109function number_format(float $num, int $decimals = 0, ?string $decimal_separator = ".", ?string $thousands_separator = ","): string {}
1110
1111function fmod(float $num1, float $num2): float {}
1112
1113function fdiv(float $num1, float $num2): float {}
1114
1115/* microtime.c */
1116
1117#ifdef HAVE_GETTIMEOFDAY
1118function microtime(bool $as_float = false): string|float {}
1119
1120function gettimeofday(bool $as_float = false): array|float {}
1121#endif
1122
1123#ifdef HAVE_GETRUSAGE
1124function getrusage(int $mode = 0): array|false {}
1125#endif
1126
1127/* pack.c */
1128
1129function pack(string $format, mixed ...$values): string {}
1130
1131function unpack(string $format, string $string, int $offset = 0): array|false {}
1132
1133/* password.c */
1134
1135function password_get_info(string $hash): array {}
1136
1137function password_hash(string $password, string|int|null $algo, array $options = []): string {}
1138
1139function password_needs_rehash(string $hash, string|int|null $algo, array $options = []): bool {}
1140
1141function password_verify(string $password, string $hash): bool {}
1142
1143function password_algos(): array {}
1144
1145/* proc_open.c */
1146
1147#ifdef PHP_CAN_SUPPORT_PROC_OPEN
1148/**
1149 * @param array $pipes
1150 * @return resource|false
1151 */
1152function proc_open(array|string $command, array $descriptor_spec, &$pipes, ?string $cwd = null, ?array $env_vars = null, ?array $options = null) {}
1153
1154/** @param resource $process */
1155function proc_close($process): int {}
1156
1157/** @param resource $process */
1158function proc_terminate($process, int $signal = 15): bool {}
1159
1160/** @param resource $process */
1161function proc_get_status($process): array {}
1162#endif
1163
1164/* quot_print.c */
1165
1166function quoted_printable_decode(string $string): string {}
1167
1168function quoted_printable_encode(string $string): string {}
1169
1170/* mt_rand.c */
1171
1172function mt_srand(int $seed = 0, int $mode = MT_RAND_MT19937): void {}
1173
1174/** @alias mt_srand */
1175function srand(int $seed = 0, int $mode = MT_RAND_MT19937): void {}
1176
1177function rand(int $min = UNKNOWN, int $max = UNKNOWN): int {}
1178
1179function mt_rand(int $min = UNKNOWN, int $max = UNKNOWN): int {}
1180
1181function mt_getrandmax(): int {}
1182
1183/** @alias mt_getrandmax */
1184function getrandmax(): int {}
1185
1186/* random.c */
1187
1188function random_bytes(int $length): string {}
1189
1190function random_int(int $min, int $max): int {}
1191
1192/* soundex.c */
1193
1194function soundex(string $string): string {}
1195
1196/* streamsfuncs.c */
1197
1198function stream_select(?array &$read, ?array &$write, ?array &$except, ?int $seconds, int $microseconds = 0): int|false {}
1199
1200/** @return resource */
1201function stream_context_create(?array $options = null, ?array $params = null) {}
1202
1203/** @param resource $context */
1204function stream_context_set_params($context, array $params): bool {}
1205
1206/** @param resource $context */
1207function stream_context_get_params($context): array {}
1208
1209/** @param resource $context */
1210function stream_context_set_option($context, array|string $wrapper_or_options, ?string $option_name = null, mixed $value = UNKNOWN): bool {}
1211
1212/** @param resource $stream_or_context */
1213function stream_context_get_options($stream_or_context): array {}
1214
1215/** @return resource */
1216function stream_context_get_default(?array $options = null) {}
1217
1218/** @return resource */
1219function stream_context_set_default(array $options) {}
1220
1221/**
1222 * @param resource $stream
1223 * @return resource|false
1224 */
1225function stream_filter_prepend($stream, string $filter_name, int $mode = 0, mixed $params = UNKNOWN) {}
1226
1227/**
1228 * @param resource $stream
1229 * @return resource|false
1230 */
1231function stream_filter_append($stream, string $filter_name, int $mode = 0, mixed $params = UNKNOWN) {}
1232
1233/** @param resource $stream_filter */
1234function stream_filter_remove($stream_filter): bool {}
1235
1236/**
1237 * @param int $error_code
1238 * @param string $error_message
1239 * @param resource|null $context
1240 * @return resource|false
1241 */
1242function stream_socket_client(string $address, &$error_code = null, &$error_message = null, ?float $timeout = null, int $flags = STREAM_CLIENT_CONNECT, $context = null) {}
1243
1244/**
1245 * @param int $error_code
1246 * @param string $error_message
1247 * @param resource|null $context
1248 * @return resource|false
1249 */
1250function stream_socket_server(string $address, &$error_code = null, &$error_message = null, int $flags = STREAM_SERVER_BIND | STREAM_SERVER_LISTEN, $context = null) {}
1251
1252/**
1253 * @param resource $socket
1254 * @param float $timeout
1255 * @param string $peer_name
1256 * @return resource|false
1257 */
1258function stream_socket_accept($socket, ?float $timeout = null, &$peer_name = null) {}
1259
1260/** @param resource $socket */
1261function stream_socket_get_name($socket, bool $remote): string|false {}
1262
1263/**
1264 * @param resource $socket
1265 * @param string|null $address
1266 */
1267function stream_socket_recvfrom($socket, int $length, int $flags = 0, &$address = null): string|false {}
1268
1269/** @param resource $socket */
1270function stream_socket_sendto($socket, string $data, int $flags = 0, string $address = ""): int|false {}
1271
1272/**
1273 * @param resource $stream
1274 * @param resource|null $session_stream
1275 */
1276function stream_socket_enable_crypto($stream, bool $enable, ?int $crypto_method = null, $session_stream = null): int|bool {}
1277
1278#ifdef HAVE_SHUTDOWN
1279/** @param resource $stream */
1280function stream_socket_shutdown($stream, int $mode): bool {}
1281#endif
1282
1283#if HAVE_SOCKETPAIR
1284function stream_socket_pair(int $domain, int $type, int $protocol): array|false {}
1285#endif
1286
1287/**
1288 * @param resource $from
1289 * @param resource $to
1290 */
1291function stream_copy_to_stream($from, $to, ?int $length = null, int $offset = 0): int|false {}
1292
1293/** @param resource $stream */
1294function stream_get_contents($stream, ?int $length = null, int $offset = -1): string|false {}
1295
1296/** @param resource $stream */
1297function stream_supports_lock($stream): bool {}
1298
1299/** @param resource $stream */
1300function stream_set_write_buffer($stream, int $size): int {}
1301
1302/**
1303 * @param resource $stream
1304 * @alias stream_set_write_buffer
1305 */
1306function set_file_buffer($stream, int $size): int {}
1307
1308/** @param resource $stream */
1309function stream_set_read_buffer($stream, int $size): int {}
1310
1311/** @param resource $stream */
1312function stream_set_blocking($stream, bool $enable): bool {}
1313
1314/**
1315 * @param resource $stream
1316 * @alias stream_set_blocking
1317 */
1318function socket_set_blocking($stream, bool $enable): bool {}
1319
1320/** @param resource $stream */
1321function stream_get_meta_data($stream): array {}
1322
1323/**
1324 * @param resource $stream
1325 * @alias stream_get_meta_data
1326 */
1327function socket_get_status($stream): array {}
1328
1329/** @param resource $stream */
1330function stream_get_line($stream, int $length, string $ending = ""): string|false {}
1331
1332function stream_resolve_include_path(string $filename): string|false {}
1333
1334function stream_get_wrappers(): array {}
1335
1336function stream_get_transports(): array {}
1337
1338/** @param resource|string $stream */
1339function stream_is_local($stream): bool {}
1340
1341/** @param resource $stream */
1342function stream_isatty($stream): bool {}
1343
1344#ifdef PHP_WIN32
1345/** @param resource $stream */
1346function sapi_windows_vt100_support($stream, ?bool $enable = null): bool {}
1347#endif
1348
1349/** @param resource $stream */
1350function stream_set_chunk_size($stream, int $size): int {}
1351
1352#if HAVE_SYS_TIME_H || defined(PHP_WIN32)
1353/** @param resource $stream */
1354function stream_set_timeout($stream, int $seconds, int $microseconds = 0): bool {}
1355
1356/**
1357 * @param resource $stream
1358 * @alias stream_set_timeout
1359 */
1360function socket_set_timeout($stream, int $seconds, int $microseconds = 0): bool {}
1361#endif
1362
1363/* type.c */
1364
1365function gettype(mixed $value): string {}
1366
1367function get_debug_type(mixed $value): string {}
1368
1369function settype(mixed &$var, string $type): bool {}
1370
1371function intval(mixed $value, int $base = 10): int {}
1372
1373function floatval(mixed $value): float {}
1374
1375/** @alias floatval */
1376function doubleval(mixed $value): float {}
1377
1378function boolval(mixed $value): bool {}
1379
1380function strval(mixed $value): string {}
1381
1382function is_null(mixed $value): bool {}
1383
1384function is_resource(mixed $value): bool {}
1385
1386function is_bool(mixed $value): bool {}
1387
1388function is_int(mixed $value): bool {}
1389
1390/** @alias is_int */
1391function is_integer(mixed $value): bool {}
1392
1393/** @alias is_int */
1394function is_long(mixed $value): bool {}
1395
1396function is_float(mixed $value): bool {}
1397
1398/** @alias is_float */
1399function is_double(mixed $value): bool {}
1400
1401function is_numeric(mixed $value): bool {}
1402
1403function is_string(mixed $value): bool {}
1404
1405function is_array(mixed $value): bool {}
1406
1407function is_object(mixed $value): bool {}
1408
1409function is_scalar(mixed $value): bool {}
1410
1411/** @param string $callable_name */
1412function is_callable(mixed $value, bool $syntax_only = false, &$callable_name = null): bool {}
1413
1414function is_iterable(mixed $value): bool {}
1415
1416function is_countable(mixed $value): bool {}
1417
1418/* uniqid.c */
1419
1420#ifdef HAVE_GETTIMEOFDAY
1421function uniqid(string $prefix = "", bool $more_entropy = false): string {}
1422#endif
1423
1424/* url.c */
1425
1426function parse_url(string $url, int $component = -1): int|string|array|null|false {}
1427
1428function urlencode(string $string): string {}
1429
1430function urldecode(string $string): string {}
1431
1432function rawurlencode(string $string): string {}
1433
1434function rawurldecode(string $string): string {}
1435
1436/** @param resource|null $context */
1437function get_headers(string $url, bool $associative = false, $context = null): array|false {}
1438
1439/* user_filters.c */
1440
1441/** @param resource $brigade */
1442function stream_bucket_make_writeable($brigade): ?object {}
1443
1444/** @param resource $brigade */
1445function stream_bucket_prepend($brigade, object $bucket): void {}
1446
1447/** @param resource $brigade */
1448function stream_bucket_append($brigade, object $bucket): void {}
1449
1450/** @param resource $stream */
1451function stream_bucket_new($stream, string $buffer): object {}
1452
1453function stream_get_filters(): array {}
1454
1455function stream_filter_register(string $filter_name, string $class): bool {}
1456
1457/* uuencode.c */
1458
1459function convert_uuencode(string $string): string {}
1460
1461function convert_uudecode(string $string): string|false {}
1462
1463/* var.c */
1464
1465function var_dump(mixed $value, mixed ...$values): void {}
1466
1467function var_export(mixed $value, bool $return = false): ?string {}
1468
1469function debug_zval_dump(mixed $value, mixed ...$values): void {}
1470
1471function serialize(mixed $value): string {}
1472
1473function unserialize(string $data, array $options = []): mixed {}
1474
1475function memory_get_usage(bool $real_usage = false): int {}
1476
1477function memory_get_peak_usage(bool $real_usage = false): int {}
1478
1479/* versioning.c */
1480
1481function version_compare(string $version1, string $version2, ?string $operator = null): int|bool {}
1482
1483/* win32/codepage.c */
1484
1485#ifdef PHP_WIN32
1486function sapi_windows_cp_set(int $codepage): bool {}
1487
1488function sapi_windows_cp_get(string $kind = ""): int {}
1489
1490function sapi_windows_cp_conv(int|string $in_codepage, int|string $out_codepage, string $subject): ?string {}
1491
1492function sapi_windows_cp_is_utf8(): bool {}
1493
1494function sapi_windows_set_ctrl_handler(?callable $handler, bool $add = true): bool {}
1495
1496function sapi_windows_generate_ctrl_event(int $event, int $pid = 0): bool {}
1497#endif
1498