From: mccarthy36 at earthlink dot net Operating system: Linux PHP version: 4.3.8 PHP Bug Type: Filesystem function related Bug description: Resource returned by fopen has type 'stream'
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 bug report at http://bugs.php.net/?id=29959&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29959&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=29959&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=29959&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=29959&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=29959&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29959&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29959&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29959&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=29959&r=support Expected behavior: http://bugs.php.net/fix.php?id=29959&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=29959&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=29959&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=29959&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29959&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=29959&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29959&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=29959&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29959&r=float
