Req #75504 [NEW]: make default mode of SplFileInfo::openFile 'rb'

From: Date: Thu, 09 Nov 2017 01:51:33 +0000
Subject: Req #75504 [NEW]: make default mode of SplFileInfo::openFile 'rb'
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-212527@lists.php.net to get a copy of this message
From: divinity76 at gmail dot com Operating system: Windows* PHP version: Next Minor Version Package: SPL related Bug Type: Feature/Change Request Bug description:make default mode of SplFileInfo::openFile 'rb' Description: ------------ on most platforms, it won't make a difference, but where it actually does, the implicit rt mode of r sure is a portability hazard when not thinking about it, thus i suggest making the default mode rb, thus being "portable by default". and ofc, when you take the time to think about rb vs rt, and you decide to depend on rt, you can just set the rt mode manually. migrating codebases depending on the current default, is trivial, and this change would make it easier to write portable code. -- Edit bug report at https://bugs.php.net/bug.php?id=75504&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=75504&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=75504&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=75504&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=75504&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=75504&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=75504&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=75504&r=needscript Try newer version: https://bugs.php.net/fix.php?id=75504&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=75504&r=support Expected behavior: https://bugs.php.net/fix.php?id=75504&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=75504&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=75504&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=75504&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=75504&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=75504&r=dst IIS Stability: https://bugs.php.net/fix.php?id=75504&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=75504&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=75504&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=75504&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=75504&r=mysqlcfg

« previous php.bugs (#212527) next »