Req #45684 [Asn]: A request for foreach to be key-type agnostic.

From: Date: Sun, 24 Feb 2013 11:00:02 +0000
Subject: Req #45684 [Asn]: A request for foreach to be key-type agnostic.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-177381@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=45684&edit=1

 ID:                 45684
 Updated by:         nikic@php.net
 Reported by:        puts dot email at gmail dot com
 Summary:            A request for foreach to be key-type agnostic.
 Status:             Assigned
 Type:               Feature/Change Request
 Package:            *General Issues
 Operating System:   N/A
 PHP Version:        5.3.0alpha1
-Assigned To:        colder
+Assigned To:        nikic
 Block user comment: N
 Private report:     N

 New Comment:

@stoffle: I have an RFC and patch here: https://wiki.php.net/rfc/foreach-non-scalar-keys.
I'll try to get it into 5.5.


Previous Comments:
------------------------------------------------------------------------
[2013-02-24 03:04:21] stoffle at gmail dot com

Is there any chance this might make it into 5.5?

------------------------------------------------------------------------
[2012-06-05 22:24:11] nikic@php.net

Assigning to Etienne as he's working on this.

------------------------------------------------------------------------
[2011-04-05 19:26:00] info at strictcoding dot co dot uk

Agreed, it would be a very nice addition, this is currently a blocking issue for 
doing some cool stuff.

------------------------------------------------------------------------
[2010-09-23 11:22:06] mep_eisen at web dot de

I don't get the point why ArrayAccess allowes object as keys (which is very nice) but Iterator
does not allow it.
I use proxy objects to store instances during serialization and connect them to a single object
instance during unserialization. Having those proxies as keys in arrays would be really nice.
SplObjectStorage does not work because multiple proxies that are connected to the same underlying
object instance will always be different keys for SplObjectStorage.

What's about the feature request? Any news?

------------------------------------------------------------------------
[2010-01-21 19:19:04] bytebrite at gmail dot com

This would be a nice addition. What technical issues are preventing this functionality from being
realized?

------------------------------------------------------------------------


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

    https://bugs.php.net/bug.php?id=45684


-- 
Edit this bug report at https://bugs.php.net/bug.php?id=45684&edit=1


Thread (11 messages)

« previous php.bugs (#177381) next »