Annotation of embedaddon/php/ext/simplexml/tests/bug46048.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Bug #46048 (SimpleXML top-level @attributes not part of iterator)
                      3: --SKIPIF--
                      4: <?php if (!extension_loaded("simplexml")) print "skip"; ?>
                      5: --FILE--
                      6: <?php
                      7: $xml = '
                      8: <data id="1">
                      9:     <key>value</key>
                     10: </data>
                     11: ';
                     12: $obj = simplexml_load_string($xml);
                     13: print_r(get_object_vars($obj));
                     14: ?>
                     15: ===DONE===
                     16: --EXPECT--     
                     17: Array
                     18: (
                     19:     [@attributes] => Array
                     20:         (
                     21:             [id] => 1
                     22:         )
                     23: 
                     24:     [key] => value
                     25: )
                     26: ===DONE===

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>