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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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: Fri Dec 27 01:01:28 2024 UTC