Bug #17752 Updated: get_object_vars behaviour changed
| From: | nick_eby at bonzidev dot com | Date: | Mon, 01 Jul 2002 22:34:26 +0000 |
| Subject: | Bug #17752 Updated: get_object_vars behaviour changed | ||
| References: | 1 | Groups: | php.bugs php.doc |
| Request: | Send a blank email to php-bugs+get-12740@lists.php.net to get a copy of this message | ||
ID: 17752
Updated by: nick_eby@bonzidev.com
Reported By: michael@kimsal.com
Status: Open
Bug Type: Documentation problem
Operating System: Lunix
PHP Version: 4.2.1
New Comment:
I'd like to point out that changing behavior of such a function puts
quite a lot of pressure on developers, who don't always get notified
that such a change was made, to find the source of horrendous bugs that
result from the change. If anybody can explain to me the wisdom of
making such a drastic change in this functionality, I'd love to hear
it. Not changing the documentation only adds to the confusion.
Just writing to say "Me too-- and it hurt, dammit!"
Previous Comments:
------------------------------------------------------------------------
[2002-06-13 17:59:24] derick@php.net
This is correct behavior (and yes, it changed), making it a
documentation problem.
Derick
------------------------------------------------------------------------
[2002-06-13 15:46:12] michael@kimsal.com
We have class code such as the following:
class foo {
var $bar1;
var $bar2;
var $bar3;
}
Per the documentation, and previous experience, if I put a value only
in $bar2, get_object_vars() on the foo object would return only $bar2.
In PHP4.2.1 the behaviour now returns bar1, bar2 and bar3, regardless
of whether they have values or not. This is contrary to the
documentation, and was extremely annoying to try to track down to boot.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=17752&edit=1