summaryrefslogtreecommitdiff
path: root/ext/simplexml/tests/021.phpt
blob: d5138685f5e12da0a400d66ea19a3cbec3b9c278 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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===