#43480 [Opn->Bgs]: current,next,prev with objects
| From: | jani@php.net | Date: | Wed, 05 Dec 2007 15:45:47 +0000 |
| Subject: | #43480 [Opn->Bgs]: current,next,prev with objects | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-120392@lists.php.net to get a copy of this message | ||
ID: 43480
Updated by: jani@php.net
Reported By: nicholsr@php.net
-Status: Open
+Status: Bogus
Bug Type: Arrays related
Operating System: all
PHP Version: 5.3CVS-2007-12-02 (snap)
New Comment:
All these functions expect an array as parameter and that is also how
it's been documented. It was only a side-effect that it worked for
objects. And that document page you refer to (and the iterator there) is
for _arrays_ not objects.
Previous Comments:
------------------------------------------------------------------------
[2007-12-04 18:41:11] stas@php.net
Similar, if not exactly the same, behavior is documented in the
manual:
http://www.php.net/manual/en/language.oop5.iterations.php
and I can see no compelling reason to forbid doing the same with
functions. Is there one? I think it's too early to close this one.
------------------------------------------------------------------------
[2007-12-04 12:34:37] jani@php.net
And neither do I. Sometimes things get fixed with new versions.. ;)
------------------------------------------------------------------------
[2007-12-04 05:58:36] crrodriguez at suse dot de
I see nothing wrong with this new behaviuor, the old one looks pretty
much broken.
------------------------------------------------------------------------
[2007-12-03 15:56:58] jani@php.net
This was merely MFH'd. If it's wrong in HEAD, that should be dealt
with. I have nothing to do with how this works in HEAD.
------------------------------------------------------------------------
[2007-12-02 22:57:55] tony2001@php.net
The BC break is minimal, if at all.
I've never heard of such usage before.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/43480
--
Edit this bug report at http://bugs.php.net/?id=43480&edit=1