# SimpleXML bug

- Thread: https://externals.io/message/4380
- Original archive: https://news-web.php.net/php.internals/4380
- Started by Zeev Suraski on 2003-09-04T16:36:23+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #4380 — Zeev Suraski — 2003-09-04T16:36:23+00:00

URL: https://externals.io/message/4380#4380

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/

---

## #4382 — Sebastian Bergmann — 2003-09-04T17:16:13+00:00

URL: https://externals.io/message/4380#4382 · In reply to: #4380

Zeev Suraski wrote:
> Don't get anywhere near foreach and SimpleXML right now.  It's in the
> works :)

  Okay :)

-- 
Sebastian Bergmann
http://sebastian-bergmann.de/                   http://phpOpenTracker.de/

Das Buch zu PHP 5: http://professionelle-softwareentwicklung-mit-php5.de/
