PHP Classes
elePHPant
Icontem

Debug Info: Output information about variables and other data

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   View files View files (7)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2014-05-02 (1 year ago) RSS 2.0 feedNot yet rated by the usersTotal: 239 All time: 7,211 This week: 1,052Up
Version License PHP version Categories  
u4u-debug-info 1.0BSD License5.3.0PHP 5, Debug
Description Author  

This class can output information about variables and other data.

It can take the value of a variable and outputs its type followed by the value or data structure. NULL, empty strings and boolean values are denoted in a special way.

The output is encoded depending on whether PHP is running as a Web page script or as CLI from the command line.

It may also perform other debugging tasks like measuring the time a script takes to execute, outputting debug information to file or FirePHP, throw exception when errors are triggered, get the script memory usage, etc..

Picture of Camilo Sperberg
Name: Camilo Sperberg <contact>
Classes: 8 packages by
Country: The Netherlands The Netherlands
Age: 33
All time rank: 80923 in The Netherlands The Netherlands
Week rank: 415 Up13 in The Netherlands The Netherlands Up

Details provided by the author  
debugInfo.class.php
======

Credits
--------

This class is made by unreal4u (Camilo Sperberg). [http://unreal4u.com/](unreal4u.com).

About this class
--------

* When debugging, you need sometimes to check what's in a certain variable. This class does print that information
* It will have in special consideration the type of the variable you're printing: as such it will clearly indicate whether you're printing a boolean, empty string or even null
* Printing to screen is not practical? Print it to a file instead
* Tired of triggering errors? Convert them easily to exceptions with just one function call. From now on, every error will be converted to an exception instead
* Want to know how many time or memory a functionality in your script takes? Measure several of these benchmarks easily with this class!
* Format a unix timestamp? You can also do that easily with this class!

Basic usage
----------

<pre>include('debugInfo.class.php');
debug($variable);
</pre>

* Congratulations! You have just printed something to your screen!
* **Please see documentation folder for more options and advanced usage**

Version History
----------

* 0.1 :
    * Original class

* 0.2 :
    * Many improvements, such as:
        * General cleanup
        * Code is now more consistent
        * Extensively tested
* 0.3 :
    * Changed defaults to a much better representation
    * More checks for debugFirePHP
* 1.0 :
    * Integrated old class "benchmark" into this one
    * Some minor bug fixes
* 2.0 :
    * Compatible with composer
    * Refined auto-format output

Contact the author
-------

* Twitter: [@unreal4u](http://twitter.com/unreal4u)
* Website: [http://unreal4u.com/](http://unreal4u.com/)
* Github:  [http://www.github.com/unreal4u](http://www.github.com/unreal4u)
  Files folder image Files  
File Role Description
Files folder imageexamples (3 files)
Files folder imagesrc (1 directory)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file README.md Data Auxiliary data

  Files folder image Files  /  examples  
File Role Description
  Accessible without login Plain text file complex-example.php Example Example script
  Accessible without login Plain text file simple-example.php Example Example script
  Accessible without login Plain text file simplestExample.php Example Example script

  Files folder image Files  /  src  
File Role Description
Files folder imageunreal4u (2 files)

  Files folder image Files  /  src  /  unreal4u  
File Role Description
  Accessible without login Plain text file auxiliar-functions.php Aux. Auxiliary script
  Accessible without login Plain text file debugInfo.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%Total:239All time:7,211
 This week:0This week:1,052Up
 User Comments (1)  
 
sufficient
1 year ago (Rahul Shambharkar)
52%StarStarStar