Re: [PHP] dump a class

2007-11-29 Thread Robert Cummings
On Thu, 2007-11-29 at 18:16 +0100, Alex Toro wrote: > Hello, I would like to know why when I print_r or var_dump an object I > get the private properties. I give you an example: > > > class test > { > private $myPrivate = 'topsecret'; > } > > $myTest = new test(); > > #echo $myTest->myPr

[PHP] dump a class

2007-11-29 Thread Alex Toro
Hello, I would like to know why when I print_r or var_dump an object I get the private properties. I give you an example: myPrivate; // Fatal error: Cannot access private property test::$myPrivate in . that's OK! echo ''; print_r($myTest); #test Object #( #[myPrivate:private] => topsecret