|  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
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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
50 - 29 = ?
Subscribe to this entry?

 [2005-09-27 22:34 UTC] squasar at eternalviper dot net
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:
stream_filter_append( STDOUT, "string.rot13" );
fprintf( STDOUT, "abcd\n" );
print "abcd\n";

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2016-12-30 23:10 UTC]
-Package: Feature/Change Request +Package: Streams related
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Sep 25 01:03:38 2021 UTC