philip Sat Jan 18 20:18:23 2003 EDT
Modified files:
/phpdoc/en/reference/classobj/functions get-object-vars.xml
Log:
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 <note>. This closes bug #17752.
Index: phpdoc/en/reference/classobj/functions/get-object-vars.xml
diff -u phpdoc/en/reference/classobj/functions/get-object-vars.xml:1.2
phpdoc/en/reference/classobj/functions/get-object-vars.xml:1.3
--- phpdoc/en/reference/classobj/functions/get-object-vars.xml:1.2 Wed Apr 17
02:36:43 2002
+++ phpdoc/en/reference/classobj/functions/get-object-vars.xml Sat Jan 18 20:18:20
+2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/classobj.xml, last change in rev 1.1 -->
<refentry id="function.get-object-vars">
<refnamediv>
@@ -14,10 +14,18 @@
</methodsynopsis>
<para>
This function returns an associative array of defined object properties
- for the specified object <parameter>obj</parameter>. If variables
- declared in the class of which the <parameter>obj</parameter> is an
- instance, have not been assigned a value, those will not be returned
- in the array.
+ for the specified object <parameter>obj</parameter>.
+ </para>
+ <note>
+ <para>
+ In versions prior to PHP 4.2.0, if the variables declared in the class
+ of which the <parameter>obj</parameter> 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 <constant>NULL</constant>
+ value.
+ </para>
+ </note>
+ <para>
<example>
<title>Use of <function>get_object_vars</function></title>
<programlisting role="php">
@@ -61,6 +69,7 @@
(
[x] => 1.233
[y] => 3.445
+ [label] =>
)
Array
--
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php