Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP Callstack tool [closed]

Tags:

php

diagram

Am working on a very large PHP application written by someone else.

Does anyone know of any tool (free or commercial) that would allow me to diagram which PHP file includes / calls / needs which other PHP file ?

I tried nWire for PHP and it doesn't accurately capture my include () calls.

like image 420
Danny Sinang Avatar asked Jun 04 '10 17:06

Danny Sinang


2 Answers

If i understood you right and you want a tool that shows which include calls you made. Or did you mean a tool which shows which includes some files require?

Have a look at Xdebug i think it should be capable of doing the first thing:

Xdebug stack trace

like image 188
enricog Avatar answered Sep 29 '22 07:09

enricog


Not sure about such tool but to know what files are included, you can use get_included_files and you can get defined variables, constants and functions like this

// get vars
$vars = get_defined_vars();
// get constants
$consts = get_defined_constants();
// get functions
$funcs = get_defined_functions();

get_defined_vars
get_defined_constants
get_defined_functions

like image 20
Sarfraz Avatar answered Sep 29 '22 07:09

Sarfraz