|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2007-07-12 11:01 UTC] jani@php.net
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 01:00:01 2025 UTC | 
Description: ------------ If you fread() to the end of a file, and then additional bytes are appended to the file, future calls to fread() never return the appended bytes. This problem may have started with PHP 5.2.0. This problem still exists in PHP 5.2.3. PHP 4.4.7 does NOT suffer from this problem. Reproduce code: --------------- <?php $f = fopen ('test', 'w'); $g = fopen ('test', 'r'); fwrite ($f, "This is line 1.\n"); fflush ($f); print fread ($g, 100); fwrite ($f, "This is line 2.\n"); fflush ($f); print fread ($g, 100); ?> Expected result: ---------------- This is line 1. This is line 2. Actual result: -------------- This is line 1.