#46583 [Opn->Bgs]: file - exhaust memory

From: Date: Mon, 17 Nov 2008 09:43:19 +0000
Subject: #46583 [Opn->Bgs]: file - exhaust memory
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-131018@lists.php.net to get a copy of this message
ID: 46583 Updated by: jani@php.net Reported By: noma4i at gmail dot com -Status: Open +Status: Bogus Bug Type: Scripting Engine problem Operating System: WIN PHP Version: 5.2.6 New Comment: Allocate more memory then. This is by design. No bug. Previous Comments: ------------------------------------------------------------------------ [2008-11-16 08:23:14] 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 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=46583&edit=1

« previous php.bugs (#131018) next »