Home arrow PHP arrow Working with the X-debug extension`s var_dump() function

Working with the X-debug extension`s var_dump() function

If you’re a PHP developer who’s searching for an approachable guide to using the most relevant functions that come bundled with the X-debug extension, then look no further. Welcome to the third article of a series on debugging in PHP with the X-debug extension. Comprised of seven tutorials, this series teaches you how to utilize the features that come with the X-debug library to debug your own PHP applications.

TABLE OF CONTENTS:
  1. Working with the X-debug extension`s var_dump() function
  2. Review: the xdebug_call_function() method
  3. Using the enhanced version of the var_dump() PHP function
  4. Retrieving information about a PHP object with the var_dump() function
By: Alejandro Gervasio
Rating: starstarstarstarstar / 2
February 17, 2009

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

Introduction

And speaking of the debugging features included with X-debug, in the last article I discussed how to use the library's "xdebug_call_function()" method for determining from which function a method or statement was called during the execution of a PHP script.

In that tutorial, this function was called from within the API of a basic sample class, but it's also possible to invoke it from a procedural application and obtain the same results.

Nevertheless, the X-debug extension comes with many other functions that allow you to debug PHP programs with a greater level of detail than simply informing you of what function was called by a script, or at which line a method was invoked. That's why I'm drawing your attention now to its "var_dump()" function.

As you may know, "var_dump()" is a PHP native function, but the X-debug library provides an enhanced version of it that's capable of retrieving much more information about a supplied variable. These capabilities greatly extend its usefulness in debugging. Therefore, in this third article of the series I'll teach you how to use this function, as usual by way of illustrative code samples.

Now, it's time to get rid of the preliminaries and see how to utilize the improved version of the "var_dump()" PHP built-in function, this time to get relevant information on a specified variable. Let's get going!



 
 
>>> 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 2 - Follow our Sitemap

Dev Shed Tutorial Topics: