Bug #79101 [Opn->Nab]: get_object_vars returns empty array when set ArrayObject::ARRAY_AS_PROPS

From: Date: Sat, 11 Jan 2020 19:52:31 +0000
Subject: Bug #79101 [Opn->Nab]: get_object_vars returns empty array when set ArrayObject::ARRAY_AS_PROPS
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-224852@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=79101&edit=1 ID: 79101 Updated by: requinix@php.net Reported by: conorycom at gmail dot com Summary: get_object_vars returns empty array when set ArrayObject::ARRAY_AS_PROPS -Status: Open +Status: Not a bug Type: Bug Package: SPL related Operating System: Linux PHP Version: 7.4.1 Block user comment: N Private report: N New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php https://www.php.net/manual/en/migration74.incompatible.php#migration74.incompatible.spl Previous Comments: ------------------------------------------------------------------------ [2020-01-11 14:11:41] conorycom at gmail dot com 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 this bug report at https://bugs.php.net/bug.php?id=79101&edit=1

« previous php.bugs (#224852) next »