note 74370 added to function.fpassthru

From: Date: Sun, 08 Apr 2007 04:17:40 +0000
Subject: note 74370 added to function.fpassthru
Groups: php.notes 
Request: Send a blank email to php-notes+get-125182@lists.php.net to get a copy of this message
In PHP 4 (4.4.4 tested as a CGI, Apache 2, Linux), use of both fpassthru() and fread() in a loop suffer the SAME memory "leakage". This is characterised by all data that is sent to the client also being kept inside PHP and not released. It would appear to be a failure to garbage collect the data. In PHP 5 (5.2.1 tested as a CGI, Apache 2, Linux) this flaw is resolved in both cases. Neither fpassthru() nor fread() in a loop "leak" memory during execution. The issue of which one to use appears not to be an issue of memory as both were equally flawed in PHP 4 and both are equally fixed in PHP 5. Speed, is left to a reader exercise to test in the latest PHPs. ---- Server IP: 194.145.210.4 Probable Submitter: 82.28.36.206 ---- Manual Page -- http://www.php.net/manual/en/function.fpassthru.php Edit -- https://master.php.net/note/edit/74370 Del: integrated -- https://master.php.net/note/delete/74370/integrated Del: useless -- https://master.php.net/note/delete/74370/useless Del: bad code -- https://master.php.net/note/delete/74370/bad+code Del: spam -- https://master.php.net/note/delete/74370/spam Del: non-english -- https://master.php.net/note/delete/74370/non-english Del: in docs -- https://master.php.net/note/delete/74370/in+docs Del: other reasons-- https://master.php.net/note/delete/74370 Reject -- https://master.php.net/note/reject/74370 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#125182) next »