diff options
Diffstat (limited to 'ext/simplexml/tests/021.phpt')
-rw-r--r-- | ext/simplexml/tests/021.phpt | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/ext/simplexml/tests/021.phpt b/ext/simplexml/tests/021.phpt new file mode 100644 index 0000000..d513868 --- /dev/null +++ b/ext/simplexml/tests/021.phpt @@ -0,0 +1,25 @@ +--TEST-- +SimpleXML: Element check +--SKIPIF-- +<?php if (!extension_loaded("simplexml")) print "skip"; ?> +--FILE-- +<?php + +$ok = 1; +$doc = simplexml_load_string('<root><exists>foo</exists></root>'); +if(!isset($doc->exists)) { + $ok *= 0; +} +if(isset($doc->doesnotexist)) { + $ok *= 0; +} +if ($ok) { + print "Works\n"; +} else { + print "Error\n"; +} +?> +===DONE=== +--EXPECT-- +Works +===DONE=== |