In response to the conversation surrounding note #69872, I've created the following patch against phpdoc HEAD. However, I don't keep up on our style guidelines, so I'd appreciate it if someone else could glance at the patch at make sure there are no glaring errors.
If you do glance at it, feel free to submit the patch yourself.
Index: types.xml =================================================================== RCS file: /repository/phpdoc/en/language/types.xml,v retrieving revision 1.167 diff -u -r1.167 types.xml --- types.xml 31 Aug 2006 01:57:26 -0000 1.167 +++ types.xml 25 Sep 2006 17:28:35 -0000 @@ -1820,7 +1820,33 @@ <para> If you convert an <type>object</type> to an array, you get the properties (member variables) of that object as the array's elements. - The keys are the member variable names. + The keys are the member variable names with a few notable exceptions: + private variables have the class name prepended to the variable name; + protected variables have a '*' prepended to the variable name. + These prepended values have null bytes on either side. This can result + in some unexpected behaviour. + <informalexample> + <programlisting role="php"> +<![CDATA[ +<?php + +class A { + private $A; // This will become '\0A\0A' +} + +class B extends A { + private $A; // This will become '\0B\0A' + public $AA; // This will become 'AA' +} + +var_dump((array) new B()); +?> +]]> + </programlisting> + </informalexample> + + The above will appear to have two keys named 'AA', although one + of them is actually named '\0A\0A'. </para> <para>