|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #77781 fopen() b flag recommendation no longer necessary?
Submitted: 2019-03-22 12:04 UTC Modified: -
From: martin at auswoeger dot com Assigned:
Status: Open Package: Filesystem function related
PHP Version: Irrelevant OS:
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.
Block user comment
Status: Assign to:
Bug Type:
From: martin at auswoeger dot com
New email:
PHP Version: OS:


 [2019-03-22 12:04 UTC] martin at auswoeger dot com
From manual page:

The documentation for fopen() includes the following note:

For portability, it is strongly recommended that you always use the 'b' flag when opening files with fopen().

However it seems that since PHP 4.3.2 the 'b' flag is already the default and it should no longer be necessary.

Looking at the source code it also seems that the 'b' flag is not necessary anymore:  

I think this recommendation note should be removed.


Add a Patch

Pull Requests

Add a Pull Request

PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Thu Dec 01 07:05:54 2022 UTC