var_dump is your friend! Forget about print_r!
We'll see in a bit, why!
Pros
Cons
<?php
class Foo {
    private 
$foo "abc";
    protected 
$bar 100;
    public 
$baz "100";
}

echo 
"<pre>";
print_r( new Foo() );
var_dump(new Foo() );
var_dump( array( 12"foo" => "bar" ) );
echo 
"</pre>";
?>
Output
Foo Object
(
    [foo:Foo:private] => abc
    [bar:protected] => 100
    [baz] => 100
)
object(Foo)#866 (3) {
  ["foo":"Foo":private]=>
  string(3) "abc"
  ["bar":protected]=>
  int(100)
  ["baz"]=>
  string(3) "100"
}
array(3) {
  [0]=>
  int(1)
  [1]=>
  int(2)
  ["foo"]=>
  string(3) "bar"
}