I know that there is a similar question here, but that doesn't help me in any way even though I have the same problem of being a big project and not being able to find where a variable is first defined.
What I've tried:
I tried the find function from phpstorm (cmd+shift+f) and searched all files of the project, to no avail. The variable is $_SESSION['some_index']
it is used in multiple places in the code, but I could only find one place where it is assigned:
$_SESSION['some_index'] = someclass->getVar()
so I tried going there, that class has no constructor and the setVar()
function is only called once, and is passed (ironically) $_SESSION['some_index']
.
If there any way to follow the code maybe through debugging of some sort? I do have xdebug configured.
I did debug through the code to the spot where I got an undefined index
notice and I saw that the variable is set I just used the wrong name, but there are so many (unknown) spots where I would have to change it. I'm guessing finding out where it is set, and change it there would be quicker.