I have an idea to use token_get_all() to parse the input and do lexical analysis on the code entered so far to improve the autocomplete list.
So if you have a class Foo with methods bar() and baz() you would see:
$foo = new Foo;
$foo->b
bar baz
This could be done with real-time reflection.