php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #75504 make default mode of SplFileInfo::openFile 'rb'
Submitted: 2017-11-09 01:51 UTC Modified: -
From: divinity76 at gmail dot com Assigned:
Status: Open Package: SPL related
PHP Version: Next Minor Version OS: Windows*
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: divinity76 at gmail dot com
New email:
PHP Version: OS:

 

 [2017-11-09 01:51 UTC] divinity76 at gmail dot com
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.


Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 19:01:29 2024 UTC