php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46583 file - exhaust memory
Submitted: 2008-11-16 08:23 UTC Modified: 2008-11-17 09:43 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: noma4i at gmail dot com Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 5.2.6 OS: WIN
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: noma4i at gmail dot com
New email:
PHP Version: OS:

 

 [2008-11-16 08:23 UTC] noma4i at gmail dot com
Description:
------------
For my purpose I'am parsing into array of strings, 5mb file with near 30000 lines. 

file ? Reads entire file into an array

It exhaust memory while doing. Code like:

file("here_goes_5mb_30k_lines_file.cvs");

with 8mb opened for executing will produce:
Fatal error: Allowed memory size of 8388608 bytes exhausted

Reproduce code:
---------------
file("here_goes_5mb_30k_lines_file.cvs");

Actual result:
--------------
Fatal error: Allowed memory size of 8388608 bytes exhausted

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-11-17 09:43 UTC] jani@php.net
Allocate more memory then. This is by design. No bug.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Dec 06 17:00:01 2025 UTC