php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #43728 An addition to fread
Submitted: 2008-01-02 10:09 UTC Modified: 2008-08-14 10:14 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: rc at opelgt dot org Assigned: kalle (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: irrelevant
Private report: No CVE-ID: None
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
41 + 2 = ?
Subscribe to this entry?

 
 [2008-01-02 10:09 UTC] rc at opelgt dot org
Description:
------------
It would be nice when the description tells:
"Fread reads FROM THE CURRENT POSITION OF THE POINTER for length of 
bytes."

Reproduce code:
---------------
<?php
$datei = 'test.txt';
$dh = fopen ($datei,"w");
fwrite($dh, '123');
fclose($dh);
$dh = fopen ($datei,"r");
echo 'content: '.fread($dh, filesize($datei)).'<br>';
// rewind($dh);
echo 'content: '.fread($dh, filesize($datei));
fclose($dh);
?>

Expected result:
----------------
content: 123
content: 123

Actual result:
--------------
content: 123
content: 

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-08-14 10:14 UTC] kalle@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 15 20:01:35 2025 UTC