[doc-en] master: get-object-vars.xml (#6045)

From: Date: Sun, 08 Nov 2026 16:29:46 +0000
Subject: [doc-en] master: get-object-vars.xml (#6045)
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-23921@lists.php.net to get a copy of this message
Author: Mikhail Alferov (mmalferov) Committer: GitHub (web-flow) Pusher: lacatoire Date: 2026-11-08T17:29:42+01:00 Commit: https://github.com/php/doc-en/commit/95b9db4137f8a06b77ccabceea055a177f0fb426 Raw diff: https://github.com/php/doc-en/commit/95b9db4137f8a06b77ccabceea055a177f0fb426.diff get-object-vars.xml (#6045) * get-object-vars.xml Untyped uninitialized properties are still included in the array (with the NULL value); only typed uninitialized properties are excluded. * Update get-object-vars.xml Changed paths: M reference/classobj/functions/get-object-vars.xml Diff: diff --git a/reference/classobj/functions/get-object-vars.xml b/reference/classobj/functions/get-object-vars.xml index f9465560b51c..b2b12a10b288 100644 --- a/reference/classobj/functions/get-object-vars.xml +++ b/reference/classobj/functions/get-object-vars.xml @@ -23,9 +23,9 @@ <varlistentry> <term><parameter>object</parameter></term> <listitem> - <para> + <simpara> An object instance. - </para> + </simpara> </listitem> </varlistentry> </variablelist> @@ -47,24 +47,24 @@ <![CDATA[ <?php -class foo { +class Foo +{ private $a; public $b = 1; public $c; private $d; static $e; - - public function test() { + + public function test() + { var_dump(get_object_vars($this)); } } -$test = new foo; +$test = new Foo(); var_dump(get_object_vars($test)); $test->test(); - -?> ]]> </programlisting> &example.outputs; @@ -91,9 +91,9 @@ array(4) { </example> </para> <note> - <para> - Uninitialized properties are considered inaccessible, and thus will not be included in the array. - </para> + <simpara> + Uninitialized typed properties are considered inaccessible, and thus will not be included in the array. + </simpara> </note> </refsect1> <refsect1 role="seealso">

« previous php.doc.cvs (#23921) next »