Re: SimpleXML bug

From: Date: Thu, 04 Sep 2003 16:36:23 +0000
Subject: Re: SimpleXML bug
Groups: php.internals 
Request: Send a blank email to internals+get-4380@lists.php.net to get a copy of this message
Don't get anywhere near foreach and SimpleXML right now. It's in the works :) Zeev At 19:24 04/09/2003, Sebastian Bergmann wrote:
The following script
    <?php
    $root = simplexml_load_string('
    <root>
      <child />
    </root>
    ');
    foreach ($root->child as $child) {
        var_dump($child);
    }
    ?>
does not print anything while
    <?php
    $root = simplexml_load_string('
    <root>
      <child />
      <child />
    </root>
    ');
    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/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.internals (#4380) next »