Home arrow PHP arrow Tracking a Stack of Function Calls with the Xdebug Extension

Tracking a Stack of Function Calls with the Xdebug Extension

If you’re a PHP programmer looking for a comprehensive guide to using the most relevant functions that come with the X-debug extension, then this set of articles might be what you need. Welcome to the last part of a series focusing on debugging in PHP with the Xdebug extension. In seven approachable parts, this series gets you started utilizing this library's numerous features by way of a hands-on approach.

TABLE OF CONTENTS:
  1. Tracking a Stack of Function Calls with the Xdebug Extension
  2. Review: the xdebug_time_index() function
  3. Retrieving information with the xdebug_get_function_stack() function
  4. Displaying the contents of the stack of function calls
By: Alejandro Gervasio
Rating: starstarstarstarstar / 2
March 16, 2009

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

Introduction

Now that you’ve been introduced to the main subject of this series, it’s time to recapitulate the topics that were treated in the last installment, so you can see more clearly how to link them with the ones that I plan to discuss in this final part.

So, in simple terms, in the aforementioned article I explained how to take advantage of the functionality provided by the “xdebug_time_index()” function to build a couple of timing scripts. I started by using a procedural approach, and then took advantage of the object-oriented paradigm.

In the first case, this function in question was utilized simply for measuring the execution time of a primitive “for” loop, which was very simple to grasp. In the second example, things were more complicated, since it was used as the workhorse of a timer class. Anyway, both examples should be considered only as an introduction to using this handy function in more complex situations.

In addition, the Xdebug extension comes bundled with a few other functions, which, despite their potential functionality, simply can’t be covered completely in a series like this. Despite this inconvenience, in this final part of the series, I’m going to show you how to work with a function of the library called “xdebug_get_function_stack().” This function can be used to keep track of the stack of function calls generated by a PHP script, in this manner completing this starting guide on this helpful extension.

Does this sound good enough for you? Then start reading!



 
 
>>> More PHP Articles          >>> More By Alejandro Gervasio
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

PHP ARTICLES

- Hackers Compromise PHP Sites to Launch Attac...
- Red Hat, Zend Form OpenShift PaaS Alliance
- PHP IDE News
- BCD, Zend Extend PHP Partnership
- PHP FAQ Highlight
- PHP Creator Didn't Set Out to Create a Langu...
- PHP Trends Revealed in Zend Study
- PHP: Best Methods for Running Scheduled Jobs
- PHP Array Functions: array_change_key_case
- PHP array_combine Function
- PHP array_chunk Function
- PHP Closures as View Helpers: Lazy-Loading F...
- Using PHP Closures as View Helpers
- PHP File and Operating System Program Execut...
- PHP: Effects of Wrapping Code in Class Const...

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: