|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2006-01-18 09:43 UTC] sniper@php.net
  [2006-01-18 10:01 UTC] helly@php.net
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 18:00:01 2025 UTC | 
Description: ------------ php manual says RecursiveDirectoryIterator::hasChildren() Returns whether current entry is a directory and not '.' or '..' () Reproduce code: --------------- <?php $obj = new RecursiveDirectoryIterator("bbb"); $obj->rewind(); for($i=0;$i<5;$i++){ var_dump($obj->key()); var_dump($obj->hasChildren()); $obj->next(); } ?> directory bbb included: 1.txt ccc p.txt //ccc is a directory Expected result: ---------------- string(9) "bbb/1.txt" bool(false) string(7) "bbb/ccc" bool(true) string(9) "bbb/p.txt" bool(false) string(4) "bbb/" bool(false) string(4) "bbb/" bool(false) Actual result: -------------- string(9) "bbb/1.txt" bool(false) string(7) "bbb/ccc" bool(true) string(9) "bbb/p.txt" bool(false) string(4) "bbb/" bool(true) string(4) "bbb/" bool(true)