Vim has balloonexpr, which is leveraged in e.g. Ruby to show the API documentation for current hovered word.
How could I get something similar for PHP? What CLI/programmable options are there to access the PHP API documentation? Obviously an offline version is preferred over the online php.net HTML version :). Could e.g. doxygen be used for this?
Are there projects already that allow tooltips with PHP API documentation?
It's using the ri
CLI utility. Does such a program exist for PHP?
EDIT
Yes, more or less. Here are a few links:
Note that I just discovered them myself.
The manual is also available via *nix style man pages. To install and use:
Install:
pear install doc.php.net/pman
Upgrade:
pear upgrade doc.php.net/pman
Example usage:
pman strlen
(From: http://php.net/download-docs.php)
Once you have the pman
pages installed, you could write a little balloonexpr
function to get whatever information you need.
There are also SQLite and JSON documentation sources which might contain the information you want to display, at http://doc.php.net/downloads/