Bug #63895 [Opn->Nab]: ftell() returns wrong pointer position
Edit report at https://bugs.php.net/bug.php?id=63895&edit=1
ID: 63895
Updated by: rasmus@php.net
Reported by: bugzilla77 at gmail dot com
Summary: ftell() returns wrong pointer position
-Status: Open
+Status: Not a bug
Type: Bug
Package: Streams related
PHP Version: 5.4.10
Block user comment: N
Private report: N
New Comment:
This is quite clearly documented in the ftell() docs:
"ftell() gives undefined results for append-only streams (opened with "a"
flag)."
Previous Comments:
------------------------------------------------------------------------
[2013-01-03 22:35:27] bugzilla77 at gmail dot com
Description:
------------
ftell() returns wrong pointer position
Test script:
---------------
<?php
$f=fopen(__FILE__,'a'); // spec: 'a' place the file pointer at the end of the
file
print(ftell($f)); // spec: Returns the current position of the file read/write pointer
fclose($f);
?>
Expected result:
----------------
__FILE__ size
Actual result:
--------------
zero
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=63895&edit=1
Thread (2 messages)