ForumJoiner Posted April 16, 2006 Share Posted April 16, 2006 I'm looking for a program or, better, for PHP scripts that can display a dependecy tree for my project.More specific, I have a php script (called script1.php) that includes another 2 php scripts (called script21.php and script22.php), each of them including some files (called script21a.php, script21b.php, and script22a.php).I need a software to make a tree like:[code]script1.php - script21.php - script21a.php - script21b.php - script22.php - script22a.php [/code]I would also like to see on this tree all the functions each file have.I need too a list like:[code]function name = fnc1 (from script1.php) called function name = fnc2 (from script2.php) (with parameters: pr1, pr2) [/code]A name / pointer to resource would be perfect. Thank you. Quote Link to comment Share on other sites More sharing options...
Barand Posted April 16, 2006 Share Posted April 16, 2006 I'd create a db table, say, script_usagescript_usage--------------script_nameincluded_inFirst part of the exercise would be a data collection script to read each of your script files looking for "include" or "require" then parsing for the included script name. Write the data to the table.Second part would be a recursive script which would find script_usage records where the included_in matches the parent script, and for each one found, search for scripts included in that one and so on.Functions would be simpler (no recursion)[code]function-----------function_idfunction_nameparam_listscript_name[/code] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.