xref: /PHP-5.4/ext/dom/tests/bug35342.phpt (revision b3b51269)
1--TEST--
2Bug #35342 (isset(DOMNodeList->length) returns false)
3--SKIPIF--
4<?php require_once('skipif.inc'); ?>
5--FILE--
6<?php
7$dom = new DOMDocument();
8$dom->loadXML("<root><foo>foobar</foo><foo>foobar#2</foo></root>");
9
10$nodelist = $dom->getElementsByTagName("foo");
11
12var_dump($nodelist->length, isset($nodelist->length), isset($nodelist->foo));
13var_dump(empty($nodelist->length), empty($nodelist->foo));
14?>
15--EXPECT--
16int(2)
17bool(true)
18bool(false)
19bool(false)
20bool(true)
21