|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #70927 stream_filter_append() doesn't work for handles opened in 'x' mode
Submitted: 2015-11-17 09:30 UTC Modified: 2020-04-09 17:04 UTC
From: jon at tjs dot co dot uk Assigned: cmb (profile)
Status: Closed Package: Streams 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: jon at tjs dot co dot uk
New email:
PHP Version: OS:


 [2015-11-17 09:30 UTC] jon at tjs dot co dot uk
stream_filter_append() doesn't work for handles opened in 'x' mode, it would be helpful if the documentation was explicit about this (and any other modes it doesn't work with). 

From manual page:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-01-28 14:08 UTC]
-Package: Documentation problem +Package: Streams related
 [2020-04-09 17:04 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: cmb
 [2020-04-09 17:04 UTC]
But it is possible to append stream filters to streams opened in
'x' mode, e.g.

$filename = __DIR__ . '/70927.txt';
$stream = fopen($filename, 'x');
stream_filter_append($stream, 'string.rot13', STREAM_FILTER_WRITE);
fwrite($stream, 'hello world');
echo file_get_contents($filename);


ryyb jbeyq
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Jul 16 10:01:28 2024 UTC