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

1.1       misho       1: --TEST--
                      2: SimpleXML: Element check
                      3: --SKIPIF--
                      4: <?php if (!extension_loaded("simplexml")) print "skip"; ?> 
                      5: --FILE--
                      6: <?php
                      7: 
                      8: $ok = 1;
                      9: $doc = simplexml_load_string('<root><exists>foo</exists></root>');
                     10: if(!isset($doc->exists)) {
                     11:        $ok *= 0;
                     12: }
                     13: if(isset($doc->doesnotexist)) {
                     14:        $ok *= 0;
                     15: }
                     16: if ($ok) {
                     17:          print "Works\n";
                     18: } else {
                     19:          print "Error\n";
                     20: }
                     21: ?>
                     22: ===DONE===
                     23: --EXPECT--
                     24: Works
                     25: ===DONE===

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