# [MEGAPATCH] stream filter improvement

- Thread: https://externals.io/message/888
- Original archive: https://news-web.php.net/php.internals/888
- Started by Moriyoshi Koizumi on 2003-04-13T14:23:24+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #888 — Moriyoshi Koizumi — 2003-04-13T14:23:24+00:00

URL: https://externals.io/message/888#888

Hi,

The attached patch allows stream filter implementations to accept 
the parameter as a zval rather than a string.

For practical example, you'd be able to pass parameters to strip_tags 
filter in a couple of ways, like:

a. stream_filter_append(STDOUT, "string.strip_tags",
                        PHP_STREAM_FILTER_WRITE, "<script><body>");

b. stream_filter_append(STDOUT, "string.strip_tags",
                        PHP_STREAM_FILTER_WRITE, array("script", "body"));

And this patch could also reduce my redundant codes in 
ext/standard/filters.c, so I hope this feature will be introduced in any 
way even though the patch would be actually bogus.

Any comments are welcome.

Moriyoshi
