How to trace Object-Oriented function calls in PHP without adding code to each function
Posted on 2008-06-18
I developed an code-base (single file) where all my functions are housed. Whenever I need to call one of these functions, I "require" this file.
I rescently discovered that this is a very stupid way of doing it as the file gets parsed and compiled every time I require it, causing a huge execution time bottleneck.
Now I want to split this file into smaller files, only containing the relevant functions for each page call, and only require this small file, instead of the whole "code-base" each time.
Is there an easy way of logging/tracing which functions are called upon file execution so that I can determine which functions to include in these smaller files? I've tried using xdebug, but this logs only PHP native functions, and need extra code added per function to enable me to trace calls to my custom functions. (Correct?)