1

I have a large file that I am looking at that has about 30 files included. I am re-factoring this file and am not entirely sure which of the function calls throughout the file are from (if any) which include file. These files have tons of functions in them.

Is there anyway to tell whether any function from an included file is used in the large file? It is hard to tell because there are many nested if-statements and rather than worrying about figuring out each one it would be easier to literally look for all of the function names in an included php file and see if any are referenced in my large file. Does something like this exist?

Cole Canning
  • 237
  • 3
  • 11

1 Answers1

1

I think you're looking for debug_print_backtrace()

From the manual:

debug_print_backtrace() prints a PHP backtrace. It prints the function calls, included/required files and eval()ed stuff

This might actually not be a solution, there's an interesting answer to a similar question here: that might also be of help.

Community
  • 1
  • 1
JohnnyFaldo
  • 4,121
  • 4
  • 19
  • 29