Description
I want to see support for eldoc-mode within php-mode. But deciding how to approach that implementation is not trivial. Other people have already provided implementations on the Emacs Uncyclo and through various GitHub projects. Each implementation has its pros and cons.
One method relies on accessing the PHP documentation from the web in order to find the function signatures. I want to avoid any approach that requires the user to be online. As uncommon as I'm sure it is, I frequently work offline, even with languages like PHP. So any implementation that requires an Internet connection is a bust to me.
That approach can be turned around into using local documentation. But I do not know how common that is. I have no data to back this up, but I suspect very few PHP programmers keep a local copy of the official documentation on their computers.
Another idea is to use an auxilary PHP program. It would be a program that accepts a function, class name, et cetera, and uses PHP's reflection mechanisms to return a string of information to standard output, which php-mode could then prepare for eldoc-mode and pass along for display in the minibuffer. I feel like this is a more feasible approach than using local documentation because I do think most PHP programmers keep a copy of PHP on their own computers.
None of these approaches would support showing Eldoc information for user-defined functions. That would be the 'Killer Feature' to implement. In theory it could be done by running the user's PHP code and then using the reflection methods on that. But in practice that would be unsafe and ineffecient.
I am going to work on this in my spare time as a feature for the next version. But I would greatly appreciate any thoughts, ideas, and insights from other developers who have helped make php-mode what it is.