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 Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
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

Pull Requests

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 11:01:30 2024 UTC