|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2004-10-30 18:58 UTC] helly@php.net
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 04:00:01 2025 UTC | 
Description: ------------ I have had mixed results from this. Sometimes just crashing, sometimes dumping rubbish to the browser, or memory leak errors /home/kevin/html/php/dev/this/php5-200410111830/main/spprintf.c(707) : Freeing 0x09E2237C (79 bytes), script=/home/kevin/html/blah.php === Total 1 memory leaks detected === /home/kevin/html/blah.php(15) : Fatal error - Allowed memory size of 8388608 bytes exhausted at /home/kevin/html/php/dev/this/php5-200410111830/ext/spl/spl_directory.c:303 (tried to allocate 1851878463 bytes) Allowed memory size of 8388608 bytes exhausted at /home/kevin/html/php/dev/this/php5-200410111830/Zend/zend_stack.c:28 (tried to allocate 256 bytes) Reproduce code: --------------- <?php error_reporting(E_ALL); $path = './'; $offset = 3; $count = 5; $obj= new LimitIterator(new DirectoryIterator($path), $offset, $count); foreach($obj as $key=>$file) { echo $obj->current(). ' -> '; echo $obj->getPathname() . '<br />'; } ?> Expected result: ---------------- Expect to get current filename and path Actual result: -------------- (gdb) run -X Starting program: /usr/local/apache/bin/httpd -X [Thread debugging using libthread_db enabled] [New Thread -1084544960 (LWP 20216)] Program exited with code 01. (gdb)