diff options
| author | Wez Furlong <wez@php.net> | 2004-08-24 12:52:07 +0000 |
|---|---|---|
| committer | Wez Furlong <wez@php.net> | 2004-08-24 12:52:07 +0000 |
| commit | bbd6dec20c341b9a9468ab9305b0731da782d5bb (patch) | |
| tree | 3ef90f179c191d9c328217c613ee9f8e1eb5c731 /ext/pcre/php_pcre.c | |
| parent | 0bfb0fad9227819c32fdd73dd0735a8a3fe93a15 (diff) | |
| download | php-git-bbd6dec20c341b9a9468ab9305b0731da782d5bb.tar.gz | |
Add support for the readline callback interface, allowing you to interleave
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();
}
}
Diffstat (limited to 'ext/pcre/php_pcre.c')
0 files changed, 0 insertions, 0 deletions
