Tuesday, May 16, 2006

PHP Interactive Shell

PHP_Shell looks very, very handy.

If only I could have readline support on windows.

1 comment:

Anonymous said...

You can get partial readline support for Windows (no completion callback, or at least I haven't figured that part out yet) with http://gnuwin32.sourceforge.net/packages/readline.htm and FFI:

$rl = new FFI("
[lib='readline5.dll']
char *readline(char *prompt);
void add_history(char *line);
");

while(true) {
$line = $rl->readline('prompt ->');
$rl->add_history($line);
print "[$line]\n";
if ($line == 'quit') { exit; }
}