Home » Php » Possible to view method/function docs in NetBeans for PHP?

Possible to view method/function docs in NetBeans for PHP?

Posted by: admin July 12, 2020 Leave a comment


I am wondering if its possible to have Netbeans display PHP Documentation for functions/methods/classes when you hover the mouse over a piece of code. I know it shows up documentation as a part of code completion but I don’t want to have to start typing out the name of a function which is already included within the source just to read some information on it.

This question is similar to this one but that covered Python and the solution given in that question of holding down Ctrl while hovering just shows a string like “Method: functionName (fileName.php) where as I would like to get the full documentation you get when you start typing out for example “MyClass::someStaticFuncti” with auto complete.

I am currently using Netbeans IDE 6.7.1 and tried this with custom classes/methods with PHPDoc and also builtin PHP functions.

How to&Answers:

for the 6.7.1 version of netbeans its not possible. The only thing possible is to CTRL+Click that will take you to the declaration place and you can see the docs.
I know its not elegant but its the only thing i know possible


In NetBeans 7.0 there are two ways of this:

  • Hold down Ctrl and hover the mouse over the method name (yes, it works for PHP now). This will not work if the line has an error, however.

  • Move the cursor on the method name, and press Ctrl + Shift + Space


Netbeans 10.1 on Ubuntu 16.04

For me the Ctrl + hover displays a non-resizable popup too small without scrollbars, so most of the long PHPDocs are out of sight.

Using Ctrl + Shift + Space before the symbol name as in @ddekany answer displays a list of symbols (not the one after the cursor) with their related PHPDoc underneath.

But positioning the cursor in the middle or after the symbol (method) and typing Ctrl + Space, displays a list of alternative signatures for that method and their PHPDoc in a pop-up with scrollbars and the options of opening the content in the external browser or navigating to the code.

Exactly what I needed.