1--TEST-- 2Bug #81294 (Segfault when removing a filter) 3--EXTENSIONS-- 4zlib 5--FILE-- 6<?php 7$f = fopen(__DIR__ . "/bug81294.txt", "wb+"); 8$flt1 = stream_filter_append($f, "zlib.deflate", STREAM_FILTER_WRITE); 9$flt2 = stream_filter_append($f, "string.rot13", STREAM_FILTER_WRITE); 10fwrite($f, "test"); 11stream_filter_remove($flt1); 12fwrite($f, "test"); 13stream_filter_remove($flt2); 14rewind($f); 15var_dump(urlencode(fread($f, 1024))); 16?> 17--CLEAN-- 18<?php 19@unlink(__DIR__ . "/bug81294.txt"); 20?> 21--EXPECT-- 22string(16) "%2BV-.%01%00grfg" 23