#29959 [Opn->Bgs]: Resource returned by fopen has type 'stream'
| From: | iliaa@php.net | Date: | Fri, 03 Sep 2004 02:39:05 +0000 |
| Subject: | #29959 [Opn->Bgs]: Resource returned by fopen has type 'stream' | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-65657@lists.php.net to get a copy of this message | ||
ID: 29959
Updated by: iliaa@php.net
Reported By: mccarthy36 at earthlink dot net
-Status: Open
+Status: Bogus
Bug Type: Filesystem function related
Operating System: Linux
PHP Version: 4.3.8
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
This is expected.
Previous Comments:
------------------------------------------------------------------------
[2004-09-03 00:03:46] mccarthy36 at earthlink dot net
Description:
------------
The resource returned by fopen() (when used to open a file) is reported
as type 'stream', not 'file'.
I'm not sure if this is a documentation problem or an fopen() problem.
Appendix K doesn't list any functions as returning resources of type
'stream'. But, as 'stream' seems more generic, from my perspective it
seems desirable to have the resource returned by fopen() identified as
'file' as described in the documentation.
Reproduce code:
---------------
$file = fopen( 'file.txt', 'r' );
var_dump( get_resource_type( $file ) );
Expected result:
----------------
Appendix K. List of Resource Types states that 'file' is the type of
resource returned by fopen().
Actual result:
--------------
'stream' is reported as the type of the resourced returned by fopen().
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=29959&edit=1