From eba4fa61288e5beceaaab4b552b18cf68e3b34f8 Mon Sep 17 00:00:00 2001 From: Joey Smith Date: Tue, 26 Sep 2006 00:37:57 +0000 Subject: [PATCH] Fix #38935, document changes in PHP5 when casting objects to arrays. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@220546 c90b9560-bf6c-de11-be94-00142212c4b1 --- language/types.xml | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/language/types.xml b/language/types.xml index 8b940384e8..f5f54a3b8f 100644 --- a/language/types.xml +++ b/language/types.xml @@ -1,5 +1,5 @@ - + Types @@ -1820,7 +1820,33 @@ $error_descriptions[8] = "This is just an informal notice"; If you convert an object 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. + + + +]]> + + + + The above will appear to have two keys named 'AA', although one + of them is actually named '\0A\0A'.