Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jump to function declaration in php

Tags:

function

php

I have the following ide's for php

  1. Dreamweaver
  2. php-Eclipse
  3. Textpad

I wish to jump to a function's definition which is located in another file which is not yet open. How could I do that. I am studying a websites code and have the entire directory structure in my local root folder. I come across certain functions and I don't know in which file their definition is. Please suggest something.

like image 592
Abhishek Avatar asked May 18 '10 12:05

Abhishek


2 Answers

In eclipse PDT IDE put mouse over class name, property, method or function name (must be in opened eclipse project) and press CTRL + clic.

It work with almost all declarations, even constants and class constants. In most case it will work, but it can have trouble with some dynamic property assignement like magic methods or certain injected dependency.

The file will be opened, and if target is in same file code view will scroll to the declaration

like image 184
Benoit Avatar answered Sep 24 '22 10:09

Benoit


Press F3 in eclipse and you will find the declaration.

like image 42
Hammad Anwer Avatar answered Sep 23 '22 10:09

Hammad Anwer