Does Storm know PHP function references?

I am sure it is here but haven't been able to find it. Is it possible to open php manual of a function?

For example, in phpED, if i hold cursor over the word "date" in my code and hit F1, it opens the PHP manual for the Date function inside the IDE. Does Storm have this ability?

9 comments

Hi there,

>Is it possible to open php manual of a function?

Yes  -- rather brief internal window based on the stub files (or actual source code) or external URL (for PHP's own stuff it will be a php.net link)

>it opens the PHP manual for the Date function inside the IDE

Yes and No (for the "inside" part).

Place caret on desired function/class/constant/etc and

  • Invoke "View | Quick Documentation" (Ctrl+Q using Default keymap) -- it will show brief documentation popup with info of what PhpStorm knows about it (e.g. from PHPDoc comment for that entity or detected parameter/return types)
  • or invoke "View | External Documentation" and it will open URL in your default browser that is defined in PHPDoc block comment for that entity (uses first @link tag)

https://www.jetbrains.com/help/phpstorm/viewing-reference-information.html

P.S. You can Ctrl+Click on any function/class/etc and IDE will take you to the definition -- in case of standard PHP stuff it will take you to the stub file.

0

Thank you for quick reply.

I re-assigned F1 to Quick Doc and this seems to work ok. Showing stub file seems pretty useless; but maybe useful for other things besides PHP functions.

0

>Showing stub file seems pretty useless; but maybe useful for other things besides PHP functions.

I forgot to add there that it's for you to see how it looks in case if you are interested.

Plus ... some people do prefer reading plain PHPDoc over Quick Documentation popups (but then ... they usually do not like any popups/gutter icons/side markers and other stuff -- mostly plain code with basic syntax colors).

0

I assigned F1 to look up PHP function reference and this seems to be working; although not very consistent. I just tried with FOREACH, IF and many others and i can see this does not work..

0

foreach, if are language constructs/keywords and not functions/classes or alike -- they do not have PHPDoc hence no documentation.

0

yet, in phpED, when i hit F1 on foreach, it does correctly pull up the foreach php manual page.

0

Shift+F1 will open external documentation.

Is it not suitable?

0

Yes, Shift-F1 would be ok... except it doesn't work.

0

>yet, in phpED, when i hit F1 on foreach, it does correctly pull up the foreach php manual page.

It's PhpStorm and it works differently -- it does not provide documentation for PHP language constructs. Same with JavaScript.

0

Please sign in to leave a comment.