Bug #30157 [Com]: ftell() function does not use stream_tell()

From: Date: Fri, 26 Aug 2011 13:26:58 +0000
Subject: Bug #30157 [Com]: ftell() function does not use stream_tell()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-162943@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=30157&edit=1

 ID:                 30157
 Comment by:         bugs dot php at mohiva dot com
 Reported by:        tendencies at free dot fr
 Summary:            ftell() function does not use stream_tell()
 Status:             Open
 Type:               Bug
 Package:            Streams related
 Operating System:   *
 PHP Version:        5CVS-2004-09-19 (dev)
 Block user comment: N
 Private report:     N

 New Comment:

Can you explain why this isn't a bug? In my opinion it's a bug, because the stream_tell
method gets never be called in respond to ftell, as it is described in the
documentation(http://www.php.net/manual/en/streamwrapper.stream-tell.php).

>> Do you have further analyzes to provide?
With the provided code snippet, the behaviour is full reproducible.

If this isn't a bug, how can I retrieve the actual file pointer position. For all internal
stream protocols it is possible with ftell. Only for the custom implemented protocols it isn't.
Maybe I'm wrong or I miss something?


Previous Comments:
------------------------------------------------------------------------
[2011-08-25 12:40:50] pajoye@php.net

There is no bug but a feature request which seems to be very discutable. Do you 
have further analyzes to provide?

------------------------------------------------------------------------
[2011-08-25 12:30:42] bugs dot php at mohiva dot com

Two years later the bug is still present in 5.3.8

------------------------------------------------------------------------
[2009-02-24 17:18:11] doctorrock83 at gmail dot com

Confirmed at the date of this message, the bug is still present in PHP 5.2.8, and PHP 5.3 branch.

------------------------------------------------------------------------
[2006-07-26 16:43:31] wez@php.net

(PS: I got here via Bug #37096)

------------------------------------------------------------------------
[2006-07-26 16:42:25] wez@php.net

I truly hope that this patch didn't get committed; it's not part of the streams design and
is fundamentally redundant.

I don't have time to make any further commentary than that; further analysis of the user-stream
case mentioned in this bug report is required, but it certainly does not require making this kind of
change to the core.

------------------------------------------------------------------------


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

    https://bugs.php.net/bug.php?id=30157


-- 
Edit this bug report at https://bugs.php.net/bug.php?id=30157&edit=1


Thread (21 messages)

« previous php.bugs (#162943) next »