Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In Netbeans PHP if you control + mouse1 click on an object or variable it will go to the initial declaration, if it's in the same script.

But is there any way to make it go to the initial declaration if it was made inside a previously included script?

share|improve this question

There may be a better way to do this, but this is my work around:

  1. Select or highlight the variable.
  2. Right click > Refactor > Rename...
  3. Change the name.
  4. Click the Preview button

Netbeans will then list all the occurrences of the variable within your project. From this list, you should be able to find where you initialized it.

Be sure to click the Cancel button, if you do not mean to rename the variable.

For the same results without refactoring, you can also use Edit > Find Usages.

share|improve this answer
hi thanks for your reply. Your method is a bit like the 'find usages' option, and would probably work in most instances but I have an enormous framework here with a number of global variables being used hundreds of times across numerous scripts, and working out where each had been instantiated is proving to be problematic. – Spoonface Jan 17 '12 at 18:29
Ah. The Edit > Find Usages option is much simpler than what I suggested, although the result is effectively the same. – iglvzx Jan 17 '12 at 18:32
hmm looks like it's not possible, so I might consider changing IDE's as this is a pretty big issue for me at the moment – Spoonface Jan 19 '12 at 11:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.