1--TEST--
2Bug #46147 (after stream seek, appending stream filter reads incorrect data)
3--FILE--
4<?php
5$fp = tmpfile();
6fwrite($fp, "this is a lowercase string.\n");
7fseek($fp, 5);
8stream_filter_append($fp, "string.toupper");
9while (!feof($fp)) {
10    echo fread($fp, 5);
11}
12
13--EXPECT--
14IS A LOWERCASE STRING.
15