Hi,
when the parent class has some private attributes, we can't access them using XDebug. However var_dump works fine in this case.
the code I've used is:
class abc {
private $arr;
public function abc(){
$this->arr = array(
0 => array("some", "values"),
1 => array("some", "more", "values")
);
}
}
class def extends abc {
}
$o = new def;
echo "o: ";
var_dump($o);
Have a look at the end of the log:
there is no "fullname" property in that case...
[ log ] property_get -i 10 -n $o
[ log ] <?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="property_get" transaction_id="10"><property name="$o" fullname="$o" address="148281248" type="object" children="1" classname="def" numchildren="1"><property name="CLASSNAME" type="string"><![CDATA[def]]></property><property name="arr" facet="private" address="148282540"></property></property></response>
Comparing to what happens when I use "abc" (base) class:
[ log ] property_get -i 10 -n $o
[ log ] <?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="property_get" transaction_id="10"><property name="$o" fullname="$o" address="148281248" type="object" children="1" classname="abc" numchildren="1"><property name="CLASSNAME" type="string"><![CDATA[abc]]></property><property name="arr" fullname="$o->arr" facet="private" address="148282540" type="array" children="1" numchildren="2"></property></property></response>
Which is obvious reason why it fails.
I'm using latest SVN version (compiled today, 28 Nov 2009). I've tried it on 2.0.5 compiled with PECL as well.
Both on Ubuntu Linux. Thread safe mode, 32 bit. |