ID: 28371 Updated by: [EMAIL PROTECTED] Reported By: rc at opelgt dot org -Status: No Feedback +Status: Open Bug Type: Documentation problem Operating System: MacOSX 10.3 PHP Version: 4.3.4 New Comment:
To resume.. First is bug #32889 : ftruncate doesn't move the file pointer. After file is truncated file pointer is still at 11th position and if you comment first rewind you'll get: - in "r+" mode 15 bytes size file - in "a+" mode filesize == 5 bytes So, in append mode PHP makes additional fseek to the end of file. Seems logical to me if the same thing will be done in ftruncate. Next bogus moment in this example is filesize() function - size of the file grows due to the previous bug, but filesize() cache isn't updated. That's why last fread in r+ mode doesn't return newly written string - it reads only first 10 empty bytes occurred after write operation beyond the EOF, while actual content is at bytes 11-15. Blank output with "w+" mode is documented - this mode erases all previous contents, so there is nothing to read. Previous Comments: ------------------------------------------------------------------------ [2005-04-21 01:00:04] phpdoc at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". ------------------------------------------------------------------------ [2005-04-13 09:16:31] [EMAIL PROTECTED] Guess! Come on guy, if you want to help us to fix the docs, write something meaningful. This bug fell twice to the state No Feedback, you reopened it twice and now you are asking what's the preferred language??? P.S. English is the preferred language. ------------------------------------------------------------------------ [2005-04-09 02:10:58] rc at opelgt dot org Which language do you prefer: english or Deutsch? ------------------------------------------------------------------------ [2005-04-01 01:00:04] phpdoc at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". ------------------------------------------------------------------------ [2005-03-24 16:09:12] [EMAIL PROTECTED] Tell us what's wrong or missing mainly in the table "A list of possible modes for fopen() using mode". The behavior of the modes is explained well there IMHO. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/28371 -- Edit this bug report at http://bugs.php.net/?id=28371&edit=1