redbullmarky Posted April 18, 2007 Share Posted April 18, 2007 Hi all This may not be much a design issue, but might be something more suitable for the local crowd to answer... Recently, I've developed a nice framework, but as many of the functions/classes/methods are recycled from old stuff, alot of it is kinda rusty, deprecated, etc and I wish to get rid. Also, each time I package up the files of a new site (built on the framework) for a client, I don't need to include files that are completely unused - and don't necessarily wanna go through the whole thing picking out what I have/havent used, either I currently have one main installation of my framework which happily drives about 4 sites (plus God knows how many development sites ontop of that, but that's a different story...) What I wanna do is determine if there's a way (ideally without code, but open to suggestions) to: a) determine what files PHP is including during a complete site run (obviously this will differ page to page, but if there's a report I can get, I can handle the rest) b) determine ALL functions/methods that PHP is calling so I can easily trace and get rid of the old junk ones I don't use without breaking anything in other sites. If PHP is able to tell me the answer to "a" above, then I could easily write something that would pull all the relevent framework files together when it comes to packaging it all up, so removing the need to include my entire framework. I don't mind getting down and dirty with something lower level than PHP if it's the only way to go, but if there is anything I'm missing or any tools I could be using, please share Cheers Mark Quote Link to comment https://forums.phpfreaks.com/topic/47649-usage-details/ Share on other sites More sharing options...
Guest prozente Posted April 18, 2007 Share Posted April 18, 2007 In order to see which files are included you can use get_included_files() For tracing you can see if debug_print_backtrace() works for your needs, this will also show included files. Quote Link to comment https://forums.phpfreaks.com/topic/47649-usage-details/#findComment-232728 Share on other sites More sharing options...
redbullmarky Posted April 19, 2007 Author Share Posted April 19, 2007 In order to see which files are included you can use get_included_files() For tracing you can see if debug_print_backtrace() works for your needs, this will also show included files. get_included_files() definitely does the trick in one respect - odd i'd never come across that before, so thanks - thats great! debug_backtrace / debug_print_backtrace seem to only show a couple or three "steps" - ideally i'm looking at something with the ability of tracking every function call through the whole start to finish, if indeed that's possible. anyways - cheers for the help! Quote Link to comment https://forums.phpfreaks.com/topic/47649-usage-details/#findComment-233055 Share on other sites More sharing options...
Guest prozente Posted April 19, 2007 Share Posted April 19, 2007 http://xdebug.org/ may also be an option, I haven't tried it but it looks promising Quote Link to comment https://forums.phpfreaks.com/topic/47649-usage-details/#findComment-233060 Share on other sites More sharing options...
redbullmarky Posted April 19, 2007 Author Share Posted April 19, 2007 great stuff, i'll take a look. cheers! Mark Quote Link to comment https://forums.phpfreaks.com/topic/47649-usage-details/#findComment-233068 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.