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

1.1       misho       1: --TEST--
                      2: SimpleXML: Attribute compared to string
                      3: --SKIPIF--
                      4: <?php if (!extension_loaded("simplexml")) print "skip"; ?> 
                      5: --FILE--
                      6: <?php
                      7: 
                      8: $doc = simplexml_load_string('<root><name attr="foo">bar</name></root>');
                      9: print $doc->name["attr"];
                     10: print "\n";
                     11: if ($doc->name["attr"] == "foo") {
                     12:          print "Works\n";
                     13: } else {
                     14:          print "Error\n";
                     15: }
                     16: ?>
                     17: ===DONE===
                     18: --EXPECT--
                     19: foo
                     20: Works
                     21: ===DONE===

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