go to Definition....... Drives me nuts

The variable is in a File that I include on my php Script

The Variable, I mouse over it and I see "Undefined Valiable" , It was defined in the Parent file... the file where I include it to the script.

I right click, and then I click "go to Definition", and it takes me to another script where it just happens to used a variable with the same name. LOL little things.....?:|

2 comments
Comment actions Permalink

Can't say that this BUG gives me confidence in PHPStorm, Seems is has been in "youTracks" since 2010. lol

Been playing with it today, Simplified version of my script, thinking it was my code, but now i see it is now my code. LOL

If a function is not working ...REMOVE IT:x

0
Comment actions Permalink

As I understand you are using global variables / lots of includes/requires instead of OOP (classes) and passing all necessary data via parameters? If that's the case then yes -- this IDE is not that great in such cases, especially if variable can be defined in multiple places.

I'm using classes, passing all necessary data as parameters/config arrays and simply do not have such issues (yes -- coding approach is different here).

Been playing with it today, Simplified version of my script, thinking it was my code, but now i see it is now my code.

Sorry, no idea what you meant to say here.

It would be good if you could provide some real code samples (a test project) that would illustrate the issue -- this way I may give some advices/notes.

0

Please sign in to leave a comment.