1

Is there a tool that helps to track all potential use of, say, a specified variable? At the moment I need this for PHP but would like also to know if there are (better) tools for other languages instead.

I've found http://phpcallgraph.sourceforge.net/ that would offer some help, but it seems it graphs function tree, including functions that most certainly does not use the data I want to follow. An option to filter out all those "unrelated" functions from the function call tree apparently is what I'm looking for. Also, I need to see all the called functions for each caller function in turn (only if the particular variable/value is being passed).

The need is to see, when changing existing, not too well organised code — all the possible uses of values (e.i. data dependencies) of a specific DB field to understand what impact and where its changes may have on the code and modify it accordingly if needed.

Jānis Elmeris
  • 1,975
  • 1
  • 25
  • 43
  • 1
    If it's a string value in particular, I suppose you could abuse PHP's taint checking to track it... taint only that string, then after execution, see what strings end up tainted. – Sneftel Aug 15 '14 at 08:14
  • Thanks for the suggestion! I was looking for static analysis, but this may be useful, too! Only need to be careful that the string doesn't become untained by accident. – Jānis Elmeris Aug 15 '14 at 09:38

0 Answers0