Home arrow PHP arrow Benchmarking with the Xdebug Extension

Benchmarking with the Xdebug Extension

Welcome to the sixth installment of a series that covers debugging in PHP with the Xdebug extension. Comprised of seven approachable tutorials, this series gets you started using the set of functions provided by this helpful library, so you can begin debugging your own PHP applications with an excellent level of control.

TABLE OF CONTENTS:
  1. Benchmarking with the Xdebug Extension
  2. Review: tracking program flow with the Xdebug extension
  3. Benchmarking PHP applications with the X-debug extension
  4. Extending the use of the xdebug_time_index() function
By: Alejandro Gervasio
Rating: starstarstarstarstar / 1
March 09, 2009

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

Introduction

In case you haven’t heard about it yet, the Xdebug extension is a full-featured library that allows you to perform all sorts of debugging tasks in PHP. These range from checking the values assigned to variables and determining which program lines are executed by the PHP engine, to performing more complex operations, such as benchmarking entire applications and verifying in which order functions are called by a script.

Of course, it’s nearly impossible to learn how to achieve all of these tasks in only one single step, so if you’re interested in mastering the most relevant methods that come bundled with the Xdebug PHP extension, then you might want to have a close look at this group of educational articles.

Now that you’re aware of the topics that are covered in this series of articles, it’s time to recall what we discussed in the previous part. In that particular chapter, I used a couple of examples to help explain how to use the  “xdebug_start_code_coverage()” and “xdebug_get_code_coverage()” functions to keep track of the sequence of lines executed by a sample PHP script.

These functions permit you to verify, with a decent level of accuracy, the order in what the different blocks that compose a certain PHP application are called by the interpreter. Logically, performing this controlling process helps to debug errors that are commonly raised when working with conditional statements and recursive functions, which under normal conditions are pretty hard to grab.

You'll be pleased to hear that the Xdebug extension comes equipped with additional functions that allow us to perform other debugging tasks, such as benchmarking PHP applications and checking in what order certain functions were called by the PHP engine.

Therefore, in this sixth chapter of the series I’ll be discussing in depth how to take advantage of the benchmarking abilities offered by the Xdebug library, which rely heavily on its “xdebug_time_index()” function.

Are you ready to learn how to use this brand new debugging function? Then click on the link that appears below and start reading now!



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

blog comments powered by Disqus
   

PHP ARTICLES

- 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...
- PHP: Building Concrete Validators
- Sanitizing Input with PHP
- Executing Shell Commands with PHP
- Handling File Data with PHP
- File Security and Resources with PHP
- ArrayObject PHP Class Examples
- ArrayObject PHP Class: An Introduction
- Getting File System Data with PHP
- PHP Tools for Working with the File and Oper...
- Working with the File and Operating System w...
- PHP Proxy Patterns: Completing a Blog


© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 10 - Follow our Sitemap

Dev Shed Tutorial Topics: