|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-08-06 16:24 UTC] rrichards@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 04:00:01 2025 UTC |
Description: ------------ When NodeList length is int(0), empty($nodes->length) should be true Reproduce code: --------------- <?php $doc = new DOMDocument(); $xpath = new DOMXPath($doc); $nodes = $xpath->query('*'); var_dump($nodes); var_dump($nodes->length); var_dump(empty($nodes->length)); Expected result: ---------------- ket% php tmp.php object(DOMNodeList)#3 (0) { } int(0) bool(true) ket% Actual result: -------------- ket% php tmp.php object(DOMNodeList)#3 (0) { } int(0) bool(false) ket%