Annotation of embedaddon/php/ext/dom/tests/bug35342.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #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:
! 12: var_dump($nodelist->length, isset($nodelist->length), isset($nodelist->foo));
! 13: var_dump(empty($nodelist->length), empty($nodelist->foo));
! 14: ?>
! 15: --EXPECT--
! 16: int(2)
! 17: bool(true)
! 18: bool(false)
! 19: bool(false)
! 20: bool(true)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>