xref: /PHP-8.1/ext/readline/readline.stub.php (revision c8f858ef)
1<?php
2
3/** @generate-class-entries */
4
5function readline(?string $prompt = null): string|false {}
6
7/** @param int|string|bool|null $value */
8function readline_info(?string $var_name = null, $value = null): mixed {}
9
10function readline_add_history(string $prompt): bool {}
11
12function readline_clear_history(): bool {}
13
14#ifdef HAVE_HISTORY_LIST
15/**
16 * @return array<int, string>
17 * @refcount 1
18 */
19function readline_list_history(): array {}
20#endif
21
22function readline_read_history(?string $filename = null): bool {}
23
24function readline_write_history(?string $filename = null): bool {}
25
26function readline_completion_function(callable $callback): bool {}
27
28
29#if HAVE_RL_CALLBACK_READ_CHAR
30function readline_callback_handler_install(string $prompt, callable $callback): bool {}
31
32function readline_callback_read_char(): void {}
33
34function readline_callback_handler_remove(): bool {}
35
36function readline_redisplay(): void {}
37
38#if HAVE_RL_ON_NEW_LINE
39function readline_on_new_line(): void {}
40#endif
41#endif
42