|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-05-30 16:54 UTC] tony2001@php.net
[2006-05-30 17:03 UTC] judas dot iscariote at gmail dot com
[2006-05-30 17:53 UTC] php at tothebrim dot net
[2006-05-30 18:40 UTC] bjori@php.net
[2006-05-30 19:14 UTC] php at tothebrim dot net
[2006-05-30 20:59 UTC] rrichards@php.net
[2006-05-30 21:31 UTC] php at tothebrim dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 02:00:01 2025 UTC |
Description: ------------ This code works perfectly in version 5.1.2. I needed to upgrade in order to make use of simpleXMLElement->addChild and simpleXMLElement->addAttribute I have attempted this with 5.1.3, 5.1.4 and 5.2 with Apache 2.0.58 and 5.2 and 6.0 with Apache 2.2 and the same problem occurs each time. Max process time is exceeded, when I trace the problem I find that the same value is returned repeatedly in foreach. I have some foreach statements that continue to work, even using a SimpleXMLElement, but others fail every time. Reproduce code: --------------- function save_inputs($filename) { $doc = simplexml_load_file($filename); print "27<br/>"; foreach($doc as $key=>$value) { print "29<br/>"; if (sizeof($value->children()) && $value['type'] == "1") { print "31<br/>"; $value['combine'] = $_POST["combine~$key"]; print "33<br/>"; process_rows($doc,$key, $value); print "35<br/>"; } elseif($value['type'] == "1") { print "37<br/>"; post_child_row($doc, $key, $value); print "39<br/>"; } } $doc->asXML($filename); } Expected result: ---------------- Max Process Time Exceeded Actual result: -------------- Complete the foreach