List of php functions at the top of the file? (or how to quickly get to php functions?)

Php editor I use function transitions when I click their names, so I thought it would be great if I could list all the functions at the top of the file so that when I open the file I can quickly jump to the one that interests me. Of course, if I put the names of the functions at the top of the file, then they will all be called when the file is loaded (actually this is the class I'm talking about).

Is there a way to do this, or am I just dreaming? :-)

+7
source share
5 answers

If all functions are inside the same file where you are, just use the Structure Panel ( Alt + 7 ).

Alternatively use Navigation | The file structure ( Ctrl + F12 ), which is very similar to the structure panel (some consider it more convenient (more keyboard-oriented) + it can display more elements depending on the language, etc.).

Otherwise - see answer from @Eric - Navigation | Character ... ( Ctrl + Alt + Shift + N )

+17
source

Your IDE can already do this. No need to add redundant headers to the source code:

Ctrl + Shift + Alt + N

+3
source

It may be too late, but in the latest version of PhpStorm, you can press Command + F12 on MacOSX or Ctrl + F12 to display a list of functions and file structures.

+2
source

Are you talking about literally "listing" them or creating them at the top of the file?

function oneofthem() { // blah } 

or

 oneofthem(); 

The last one will load them. The first one will not load it, and it fully matches the list at the top of the file. Keep in mind that this should clearly be below your class selector.

Secondly, if you simply list them, you can always simply comment on them.

0
source

As @Scuzzy suggested, use the code folds function of your IDE. Keep functions collapsed so that they appear as a list.

0
source

All Articles