More details on check Utilties introduction
dump
PHP utility for tracing and displaying objects

Function and purpose

Download
Zipped PHP programs and ancillary files
dump is just a way of dumping complex objects and arrays, showing the stack and tracing execution. Think of it as a much better version of print_r() with tweakable features to let you see needles in haystacks by using a colour-coded display. It can write to the screen or a separate file or files.

Examples

Two example PHP programs All in new windows
Run exercise_dump_trace View source
Run exercise_dump_display View source

Documentation

include('dump.php'); etc. Immediate print... print(dump::Value($object1),'What object 1 looks like'); ... somewhere deeply nested dump::Trace('STACK'); // will list complex arguments ... at a convenient place dump::Output('someQuickFile.htm');

Cheat sheet Complete API

Getting started

Reference

Calling dump::Help() displays the reference. See it now
  • Notes
  • A common method of working is to view the live program on one tab and the output on another (eg. dump::Output('dumped.htm')). This is fine but remember to reload the tab after each run. A timestamp is provided for reference.
  • protected and private properties are not dumped. Getting dump to do this would involve a lot of work so you'll have to use a temporary work around.