php-src/ext/readline
Peter Kokot 888eb370cf
Fix -Wundef/C4668 warnings (#15853)
- ZTS is either undefined or defined (to 1)
- PHP_WIN32 is either undefined or defined (to 1)
- HAVE_LIBEDIT is either undefined or defined (to 1)
2024-09-14 11:28:32 +02:00
..
tests Merge branch 'PHP-8.3' 2024-08-07 22:38:48 +01:00
config.m4 Autotools: Sync CS in extensions (#15343) 2024-08-11 17:42:26 +02:00
config.w32
CREDITS
php_readline.h Sync #if/ifdef/defined (#14512) 2024-06-10 08:56:10 +02:00
readline_arginfo.h Generated arginfo header files: combine preprocessor conditional blocks (#15736) 2024-09-04 13:04:22 +02:00
readline_cli.c Preferably include from build dir (#13516) 2024-06-26 00:26:43 +02:00
readline_cli.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
readline.c Fix -Wundef/C4668 warnings (#15853) 2024-09-14 11:28:32 +02:00
readline.stub.php Sync #if/ifdef/defined (#14520) 2024-06-11 22:47:05 +02:00
README.md Allow overriding completion in auto_prepend_file 2020-08-01 11:39:08 -04:00

readline

Provides generic line editing, history, and tokenization functions. See https://www.php.net/manual/en/book.readline.php

Implementation Details

C variables starting with rl_* are declared by the readline library (or are macros referring to variables from the libedit library). See http://web.mit.edu/gnu/doc/html/rlman_2.html

This should only be used in the CLI SAPI. Historically, the code lived in sapi/cli, but many distributions build readline as a shared extension. Therefore, that code was split into ext/readline so that this can dynamically be loaded. With other SAPIs, readline is/should be disabled.

readline_cli.c implements most of the interactive shell(php -a).