ID: 29959 Updated by: [EMAIL PROTECTED] Reported By: mccarthy36 at earthlink dot net -Status: Open +Status: Closed Bug Type: Documentation problem Operating System: Linux PHP Version: 4.3.8 New Comment:
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. Previous Comments: ------------------------------------------------------------------------ [2004-09-03 19:33:53] [EMAIL PROTECTED] Let's make it a documentation problem then, because that's what this is. ------------------------------------------------------------------------ [2004-09-03 17:11:58] mccarthy36 at earthlink dot net Not to be combative, but it's not _expected_ based on what the manual says. * fopen() returns a resource * get_resource_type() returns a string representing the type of the resource * Appendix K gives 'file' as the resource type name created by fopen() Would you please say specifically which part of the manual I should double-check to better understand the situation? Thank you ------------------------------------------------------------------------ [2004-09-03 04:39:04] [EMAIL PROTECTED] 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. ------------------------------------------------------------------------ [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