Doc #81218 [NEW]: get_object_vars returns parent class parameters

From: Date: Thu, 01 Jul 2021 15:49:07 +0000
Subject: Doc #81218 [NEW]: get_object_vars returns parent class parameters
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-18914@lists.php.net to get a copy of this message
From: mixlion09 at gmail dot com Operating system: * PHP version: 8.0.8 Package: Documentation problem Bug Type: Documentation Problem Bug description:get_object_vars returns parent class parameters Description: ------------ Documentation of get_object_vars says "Note that it will only return parameters defined on that object's class, not on its parent class" (from the https://www.php.net/manual/en/function.get-object-vars.php), but it returns parameters of the parent classes as well. Test script: --------------- class A { public $aProperty; } class B extends A { public $bProperty; } $b = new B(); var_dump(get_object_vars($b)); Expected result: ---------------- No misleading statement in the documentation -- Edit bug report at https://bugs.php.net/bug.php?id=81218&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=81218&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=81218&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=81218&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=81218&r=needscript Try newer version: https://bugs.php.net/fix.php?id=81218&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=81218&r=support Expected behavior: https://bugs.php.net/fix.php?id=81218&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=81218&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=81218&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=81218&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=81218&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=81218&r=dst IIS Stability: https://bugs.php.net/fix.php?id=81218&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=81218&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=81218&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=81218&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=81218&r=mysqlcfg

« previous php.doc.bugs (#18914) next »