From fe8f7fadc630be7e21b4e9ded8d6a87f3850dcba Mon Sep 17 00:00:00 2001 From: Philip Olson Date: Sun, 19 Jan 2003 01:18:20 +0000 Subject: [PATCH] As of PHP 4.2.0, the behavoir changed. Even if a variable is not assigned a value, it still exists in get_object_vars(). Essentially moved these docs in a . This closes bug #17752. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@112618 c90b9560-bf6c-de11-be94-00142212c4b1 --- .../classobj/functions/get-object-vars.xml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/reference/classobj/functions/get-object-vars.xml b/reference/classobj/functions/get-object-vars.xml index ac18b4298a..479d3c8f50 100644 --- a/reference/classobj/functions/get-object-vars.xml +++ b/reference/classobj/functions/get-object-vars.xml @@ -1,5 +1,5 @@ - + @@ -14,10 +14,18 @@ This function returns an associative array of defined object properties - for the specified object obj. If variables - declared in the class of which the obj is an - instance, have not been assigned a value, those will not be returned - in the array. + for the specified object obj. + + + + In versions prior to PHP 4.2.0, if the variables declared in the class + of which the obj is an instance, have not been + assigned a value, those will not be returned in the array. In versions + after PHP 4.2.0, the key will be assigned with a NULL + value. + + + Use of <function>get_object_vars</function> @@ -61,6 +69,7 @@ print_r(get_object_vars($p1)); ( [x] => 1.233 [y] => 3.445 + [label] => ) Array