Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:4388 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 15925 invoked by uid 1010); 4 Sep 2003 23:07:29 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 15901 invoked from network); 4 Sep 2003 23:07:29 -0000 Received: from unknown (HELO localhost.localdomain) (217.199.1.101) by pb1.pair.com with SMTP; 4 Sep 2003 23:07:29 -0000 Received: by localhost.localdomain (Postfix, from userid 1000) id E2F2A4EAB0; Thu, 4 Sep 2003 12:45:12 +0200 (CEST) To: Sebastian Bergmann Cc: internals@lists.php.net Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-ID: <1062672312.8610.54.camel@hasele> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.4 Date: Thu, 04 Sep 2003 12:45:12 +0200 Subject: Re: [PHP-DEV] SimpleXML bug From: sterling@bumblebury.com (Sterling Hughes) Zeev seems to be working on foreach and simplexml, but the above behaviour is the correct one. Why should the first loop? If I did: what would i get? -Sterling On Thu, 2003-09-04 at 18:24, Sebastian Bergmann wrote: > The following script > > $root = simplexml_load_string(' > > > > '); > > foreach ($root->child as $child) { > var_dump($child); > } > ?> > > does not print anything while > > $root = simplexml_load_string(' > > > > > '); > > foreach ($root->child as $child) { > var_dump($child); > } > ?> > > correctly prints > > object(simplexml_element)#2 (0) { > } > object(simplexml_element)#3 (0) { > } > > -- > Sebastian Bergmann > http://sebastian-bergmann.de/ http://phpOpenTracker.de/ > > Das Buch zu PHP 5: http://professionelle-softwareentwicklung-mit-php5.de/ -- If a 6600 used paper tape instead of core memory, it would use up tape at about 30 miles/second. - Grishman, Assembly Language Programming