#43154 [Fbk->Bgs]: __toArray() or __toIterator() Magic Method?
| From: | helly@php.net | Date: | Tue, 06 Nov 2007 13:18:14 +0000 |
| Subject: | #43154 [Fbk->Bgs]: __toArray() or __toIterator() Magic Method? | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-119327@lists.php.net to get a copy of this message | ||
ID: 43154
Updated by: helly@php.net
Reported By: smoseley at transio dot com
-Status: Feedback
+Status: Bogus
Bug Type: Feature/Change Request
Operating System: Linux
PHP Version: 5.2.4
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
There is also iterator_to_array().
Previous Comments:
------------------------------------------------------------------------
[2007-10-31 00:27:21] johannes@php.net
What's wrong with the Iterator and IteratorAggregate interfaces?
------------------------------------------------------------------------
[2007-10-31 00:21:24] smoseley at transio dot com
Description:
------------
Would love to see a __toArray() MM added that would default to an
associative array of an object's properties in scope, but that could be
overloaded with whatever. It would be very useful in cases where a
specific method is required to iterate through an object's properties.
Thanks! :)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=43154&edit=1