ID: 38528 Updated by: [EMAIL PROTECTED] Reported By: joel at cybersewer dot com -Status: Open +Status: Bogus Bug Type: SPL related -Operating System: Windows XP SP2 +Operating System: * -PHP Version: 5.2.0RC2 +PHP Version: 5.* 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 now way to do it different Previous Comments: ------------------------------------------------------------------------ [2006-08-21 00:35:25] joel at cybersewer dot com Description: ------------ Iteration through a large ArrayObject (e.g. 10,000+ items) is very slow. Reproduce code: --------------- $a = new ArrayObject; for ($i = 0; $i < 10000; $i++) $a[] = $i; // This is slow foreach ($a as $k => $v); // This is much faster, even though I thought this was basically what ArrayObject's getIterator method did. $it = new ArrayIterator($a->getArrayCopy()); foreach ($it as $k => $v); ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=38528&edit=1