ID: 47046 Updated by: [email protected] Reported By: karsten at typo3 dot org -Status: Open +Status: Closed Bug Type: Feature/Change Request Operating System: Mac OS X 10.5.6 PHP Version: 5.3.0alpha3 -Assigned To: +Assigned To: colder New Comment:
This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. $os = new SplObjectStorage; $other = new SplObjectStorage; // ... $os->addAll($other); Previous Comments: ------------------------------------------------------------------------ [2009-01-09 10:29:58] karsten at typo3 dot org Description: ------------ SplObjectStorage is a great replacement for arrays when it comes to storing objects. But with arrays one could use array_merge to combine sets, for SplObjectStorage there is no such simple way. Resorting to a foreach/attach loop seems cumbersome and is probably slower than an internal solution would be. I could imagine to have a merge() method on SplObjectStorage. It should directly modify the called object by merging the given argument. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=47046&edit=1
