Re: post 5.3.0 development
| From: | Rasmus Lerdorf | Date: | Sat, 27 Jun 2009 00:24:29 +0000 |
| Subject: | Re: post 5.3.0 development | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-44506@lists.php.net to get a copy of this message | ||
Just to keep the list in synch with the irc discussion. I pointed out
that this is only half of the fix. The refcount still prevents fclose
from flushing the data, so if you do:
$url = 'http://slowgeek.com/test.xml';
$cfile = 'out.xml';
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_FILE, $fp = fopen($cfile,'w'));
$status = curl_exec($ch);
fclose($fp);
$data = file_get_contents($cfile);
var_dump($data); // 0 bytes here
curl_close($ch);
$data = file_get_contents($cfile);
var_dump($data); // full contents here
I still think we need to look at doing a flush on an fclose which
doesn't reach the stream destructor due to refcount issues.
Can anybody think of any side-effects of a flush on a stream close?
-Rasmus