PEAR Manual
Prev | Chapter 40. Gtk2 | Next

# Gtk2_VarDump

Gtk2_VarDump is a simple GUI to examine php variables, for example complex arrays or objects. It displays the variable and all sub-variables/array keys/sub-objects in the left pane (a GtkTreeView), and the actual values in a list view on the right side.

The class is very easy to use: Just include the file, and call the constructor with the variable you want to have dumped.

Example 40-6. Showing a variable with Gtk2_VarDump
    <?php
    //include the file
    require_once 'Gtk2/VarDump.php';

    $myvar = array(
        'hello', 2 => 'world',
        array(1, 2, 3, 'blubb')
    );

    //graphically dump the variable in an own window
    new Gtk2_VarDump($myvar, 'variable title');
    ?>

Prev | Home | Next
Example | Up | HTML