1--TEST-- 2Bug #35781 (stream_filter_append() causes segfault) 3--FILE-- 4<?php 5 6$filename = __DIR__."/bug35781.txt"; 7 8$fp = fopen($filename, "w"); 9stream_filter_append($fp, "string.rot13", -49); 10fwrite($fp, "This is a test\n"); 11rewind($fp); 12fpassthru($fp); 13fclose($fp); 14 15var_dump(file_get_contents($filename)); 16 17@unlink($filename); 18 19echo "Done\n"; 20?> 21--EXPECTF-- 22Notice: fpassthru(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d 23string(15) "Guvf vf n grfg 24" 25Done 26