At present we have a rather large (4k+ loc) function that we wish to decompose in to separate functions.
Some of it has been decomposed where there are relatively encapsulated side effects and these ones are the easy bits.
However we now have ~3k loc of intertwined nastyness. Some vars are passed to external functions by ref and all sorts.
So, is anyone aware of any php refactoring tools that allow you to determine state modifications and side effects of a particular piece of code (including new references to variables which may be stored as members and modified later).
We have thus far being doing this by stepping into the called functions with xdebug but this is extremely intensive and some of the call stacks get quite deep.
If no-one knows of any libraries that do this as-is, can anyone think of a way of implementing this robustly? (Shy of adding features to xdebug which is beyond the scope of our project :'( )
EDIT: Also, I forgot to mention that this is legacy code so there are zero unit tests to verify behaviour.