xref: /PHP-5.3/ext/standard/tests/file/bug35781.phpt (revision 248be6fc)
1--TEST--
2Bug #35781 (stream_filter_append() causes segfault)
3--FILE--
4<?php
5
6$filename = dirname(__FILE__)."/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--
22string(15) "Guvf vf n grfg
23"
24Done
25