php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #34666 print and echo do not apply filters on STDOUT
Submitted: 2005-09-27 22:34 UTC Modified: 2016-12-30 23:10 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: squasar at eternalviper dot net Assigned:
Status: Open Package: Streams related
PHP Version: 5.1.0RC1 OS: Mac OS X 10.4.2/Darwin 8.2.0
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: squasar at eternalviper dot net
New email:
PHP Version: OS:

 

 [2005-09-27 22:34 UTC] squasar at eternalviper dot net
Description:
------------
When using the CLI SAPI, installing filters on STDOUT with 
stream_filter_prepend()/stream_filter_append() does not apply 
those filters when print or echo are used. Suggested fix: have 
sapi_cli_single_write() in sapi/cli/php_cli.c use 
php_stream_write() instead of write()/fwrite() (possibly based 
on a ./configure option?)

Reproduce code:
---------------
<?php
stream_filter_append( STDOUT, "string.rot13" );
fprintf( STDOUT, "abcd\n" );
print "abcd\n";
?>

Expected result:
----------------
nopq
nopq


Actual result:
--------------
nopq
abcd


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-12-30 23:10 UTC] cmb@php.net
-Package: Feature/Change Request +Package: Streams related
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 07:01:29 2024 UTC