|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2021-03-16 12:03 UTC] cmb@php.net
 
-Status:      Open
+Status:      Feedback
-Package:     *General Issues
+Package:     Filesystem function related
-Assigned To:
+Assigned To: cmb
  [2021-03-16 12:03 UTC] cmb@php.net
  [2021-03-28 04:22 UTC] php-bugs at lists dot php dot net
 | |||||||||||||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 07:00:01 2025 UTC | 
Description: ------------ If I specify a larger number then 8192 for fgets's length then PHP process starts to eat memory. Test script: --------------- <?php $handle = fopen('multi_gb_file', 'r'); while ( ! feof($handle) ) { $buffer = fgets($handle, 10485760); } fclose($handle); ?> Expected result: ---------------- If length is much more then 8192 and the opened file is really huge then memory usage will rise up to the size of the readed file's size.