0

What's a good tool to reverse engineer a set of php/html pages ? It's not object oriented, it's a big mess that started in early 2000 (so no UML tools obviously!). I'd like to draw a link between files/functions that are included or called via the 'action' attribute of a form.

So basically, I would like to have a nice simple diagram to have a clear idea of how is structured a site, what variable are passed between pages through "action", the arguments of functions, in a //diagram// !

Javascript have no impact on the flow of pages here.

Don't tell me that my only hope is to write a big filthy tool to do that ?!?

Thanks-

Cedric
  • 5,135
  • 11
  • 42
  • 61
  • 4
    well, you could also write a big clean tool for that and make it opensource ;) – Gordon Feb 01 '11 at 09:58
  • PHP is notorious for providing excellent ways of accidentally obfuscating redirects and links; add URL rewriting and client-side redirects, and you have yourself a real problem. If the application is a real mess, I also doubt a diagram would help much. – tdammers Feb 01 '11 at 10:09
  • 1
    Possibly duplicates http://stackoverflow.com/questions/1235513/php-call-graph-utility and http://stackoverflow.com/questions/2719734/php-application-flow-graph-or-function-call-graph. – rik Feb 01 '11 at 10:41
  • thanks to your comments guys, each of them are useful. @rik : it's not duplicates, but these topics resolve part of the problem, not everything, as after a quick check, I haven't seen how the form's action's are represented. [@]all Thanks for your help – Cedric Feb 02 '11 at 10:00

1 Answers1

1

You can use xdebug to generate a cachegrind file and then use Kcachegrind to view the diagram.

AntonioCS
  • 8,335
  • 18
  • 63
  • 92