|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-12-15 00:23 UTC] helly@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 10:00:01 2025 UTC |
Description: ------------ Not sure if this a bug or a feature, but when applying a fixed reference to a member of the iterator returned by the children() method in a foreach construct, it gets stuck in an infinite loop. Reproduce code: --------------- <?php $xml = '<parent><element /><child /></parent>'; $xmldoc = simplexml_load_string($xml); $elements = $xmldoc->children(); foreach ($elements as $element) { $elements[0]; } ?> Expected result: ---------------- Finished after a couple of seconds at most. Actual result: -------------- Infinite loop.