note 108476 added to class.iteratoraggregate

From: Date: Sun, 29 Apr 2012 02:11:30 +0000
Subject: note 108476 added to class.iteratoraggregate
Groups: php.notes 
Request: Send a blank email to php-notes+get-187398@lists.php.net to get a copy of this message
Note that, at least as of 5.3, you still aren't allowed to return a normal Array from getIterator(). In some places, the docs wrap the array into an ArrayObject and return that. DON'T DO IT. ArrayObject drops any empty-string keys on the floor when you iterate over it (again, at least as of 5.3). Use ArrayIterator instead. I wouldn't be surprised if it didn't have its own set of wonderful bugs, but at the very least it works correctly when you use it with this method. ---- Server IP: 69.147.83.197 Probable Submitter: 50.0.151.4 ---- Manual Page -- http://www.php.net/manual/en/class.iteratoraggregate.php Edit -- https://master.php.net/note/edit/108476 Del: integrated -- https://master.php.net/note/delete/108476/integrated Del: useless -- https://master.php.net/note/delete/108476/useless Del: bad code -- https://master.php.net/note/delete/108476/bad+code Del: spam -- https://master.php.net/note/delete/108476/spam Del: non-english -- https://master.php.net/note/delete/108476/non-english Del: in docs -- https://master.php.net/note/delete/108476/in+docs Del: other reasons-- https://master.php.net/note/delete/108476 Reject -- https://master.php.net/note/reject/108476 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#187398) next »