String
1
2
$variable "this is my string";
new 
dBug($variable); 
Output:
This is my string


Array
1
2
3
4
5
6
7
8
9
$variable = array(
    
"first"=>"1",
    
"second",
    
"third"=>array(
        
"inner third 1",
        
"inner third 2"=>"yeah"),
    
"fourth");

new 
dBug($variable); 
Output:
$variable (array)
first 1
0 second
third
array
0 inner third 1
inner third 2 yeah
1 fourth


Object
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
class Vegetable {

   var 
$edible;
   var 
$color;

   function 
Vegetable($edible$color="green") {
       
$this->edible $edible;
       
$this->color $color;
   }

   function 
is_edible() {
       return 
$this->edible;
   }

   function 
what_color() {
       return 
$this->color;
   }
   
}
$variable=new Vegetable("spinach");
new 
dBug($variable); 
Output:
$variable (object)
edible spinach
color green
vegetable [function]
is_edible [function]
what_color [function]


Database resource
1
2
3
4
5
6
7
$link mysql_connect('localhost''mysql_user''mysql_password');
if (!
$link)
   die(
'Could not connect: ' mysql_error());

mysql_select_db('mydb');
$result mysql_query('select * from empinfo');
new 
dBug($result); 
Output:
$result (resource)
mysql result
 ID firstname lastname age city state
199980 John Jones 45 Payson Arizona
299982 Mary Jones 25 Payson Arizona
388232 Eric Howell 32 San Diego California
488233 Mary Ann Edwards 32 Phoenix Arizona


XML Resource
1
2
3
$xmlData="../msc/data.xml" //path to xml file;
//NOTE that you have to specify the optional forceType "xml" or else output will be a string
new dBug($xmlData"xml"); 
Output:
$xmlData,"xml" (xml document)
xmlRoot
xml element
xmlName chapter
xmlAttributes  
xmlText
xmlComment  
xmlChildren
xml element
xmlName TITLE
xmlAttributes  
xmlText This is my title
xmlComment  
xmlChildren
xml element
xmlName tgroup
xmlAttributes
array
cols 3
xmlText
xmlComment Another comment here on second line
xmlChildren
xml element
xmlName entry
xmlAttributes
array
morerows 1
xmlText b1
xmlComment  
xmlChildren