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?> 14--EXPECT-- 15IS A LOWERCASE STRING. 16