blob: 1a67c6e9eedd12893f19a7b2d9e16e139a935eab (
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
26
27
28
29
30
31
32
33
34
35
|
--TEST--
Bug #46003 (isset on nonexisting nodes return unexpected results)
--SKIPIF--
<?php if (!extension_loaded("simplexml")) print "skip"; ?>
--FILE--
<?php
$xml =<<<XML
<r>
<p>Test</p>
<o d='h'>
<xx rr='info' />
<yy rr='data' />
</o>
</r>
XML;
$x = simplexml_load_string($xml);
var_dump(isset($x->p));
var_dump(isset($x->p->o));
var_dump(isset($x->o->yy));
var_dump(isset($x->o->zz));
var_dump(isset($x->o->text));
var_dump(isset($x->o->xx));
?>
===DONE===
--EXPECT--
bool(true)
bool(false)
bool(true)
bool(false)
bool(false)
bool(true)
===DONE===
|