mirror of
https://github.com/php/php-src.git
synced 2024-10-09 10:37:29 +00:00
bbd6dec20c
IO and user input. Sample script: <?php dl("readline.so"); function handle_user_input($line) { echo "You typed: '$line'\n"; if ($line == 'exit') exit; } readline_callback_handler_install('type! > ', 'handle_user_input'); while (true) { $n = stream_select($r = array(STDIN), $w = null, $e = null, null); if ($n && in_array(STDIN, $r)) { readline_callback_read_char(); } } |
||
---|---|---|
.. | ||
config.m4 | ||
CREDITS | ||
php_readline.h | ||
readline.c | ||
README.libedit |
This library can be built with libedit - non-GPL drop-in readline replacement. Libedit can be obtained from http://sourceforge.net/projects/libedit/ It is taken from NetBSD (http://www.netbsd.org/) CVS repository and modified to work as stand-alone library.