xref: /PHP-5.3/ext/simplexml/tests/bug46003.phpt (revision cfc417af)
1--TEST--
2Bug #46003 (isset on nonexisting nodes return unexpected results)
3--SKIPIF--
4<?php if (!extension_loaded("simplexml")) print "skip"; ?>
5--FILE--
6<?php
7$xml =<<<XML
8<r>
9  <p>Test</p>
10  <o d='h'>
11    <xx rr='info' />
12    <yy rr='data' />
13  </o>
14</r>
15XML;
16
17$x = simplexml_load_string($xml);
18
19var_dump(isset($x->p));
20var_dump(isset($x->p->o));
21var_dump(isset($x->o->yy));
22var_dump(isset($x->o->zz));
23var_dump(isset($x->o->text));
24var_dump(isset($x->o->xx));
25?>
26===DONE===
27--EXPECTF--
28bool(true)
29bool(false)
30bool(true)
31bool(false)
32bool(false)
33bool(true)
34===DONE===
35