1
0
mirror of https://github.com/php/php-src.git synced 2026-04-02 13:43:02 +02:00
Files
archived-php-src/ext/simplexml/tests/bug46003.phpt
Fabien Villepinte a555cc0b3d Clean DONE tags from tests
Remove most of the `===DONE===` tags and its variations.
Keep `===DONE===` if the test output otherwise becomes empty.

Closes GH-4872.
2019-11-07 21:31:47 +01:00

34 lines
548 B
PHP

--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));
?>
--EXPECT--
bool(true)
bool(false)
bool(true)
bool(false)
bool(false)
bool(true)