Xdebug profiler and xdebug_time_index() give different values
Question
I used Xdebug to profile my PHP application.
When I open the generated profile file with WinCacheGrind, it gives me a total cumulative time of 3ms for {main} (0.003s).
However, when I use the function xdebug_time_index() at the end of my code, it returns a time of 0.03s.
Anyone knows what might cause this difference and which one is more representative ?
Solution
Any chance adding that function actually increases the time needed?
Also, I can imagine the profiler will actually start running when PHP runs (time index 0) while XDebug's internal counter can start a bit earlier.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow