Bug #79101 [NEW]: get_object_vars returns empty array when set ArrayObject::ARRAY_AS_PROPS

From: Date: Sat, 11 Jan 2020 14:11:41 +0000
Subject: Bug #79101 [NEW]: get_object_vars returns empty array when set ArrayObject::ARRAY_AS_PROPS
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-224842@lists.php.net to get a copy of this message
From: conorycom at gmail dot com Operating system: Linux PHP version: 7.4.1 Package: SPL related Bug Type: Bug Bug description:get_object_vars returns empty array when set ArrayObject::ARRAY_AS_PROPS Description: ------------ get_object_vars returns an empty array if set ArrayObject::ARRAY_AS_PROPS flag in arrayObject Test script: --------------- $a = new ArrayObject; $a->setFlags(ArrayObject::ARRAY_AS_PROPS); $a->b = 'b'; var_dump(get_object_vars($a)); Expected result: ---------------- array(1) { ["b"]=> string(1) "b" } Actual result: -------------- array(0) { } -- Edit bug report at https://bugs.php.net/bug.php?id=79101&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=79101&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=79101&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=79101&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=79101&r=needscript Try newer version: https://bugs.php.net/fix.php?id=79101&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=79101&r=support Expected behavior: https://bugs.php.net/fix.php?id=79101&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=79101&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=79101&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=79101&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=79101&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=79101&r=dst IIS Stability: https://bugs.php.net/fix.php?id=79101&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=79101&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=79101&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=79101&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=79101&r=mysqlcfg

« previous php.bugs (#224842) next »