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
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: