summaryrefslogtreecommitdiff
path: root/ext/standard/tests/file/bug35781.phpt
blob: b7ffa9876029ae213701911e022c71f3ede4a826 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--TEST--
Bug #35781 (stream_filter_append() causes segfault)
--FILE--
<?php

$filename = __DIR__."/bug35781.txt";

$fp = fopen($filename, "w");
stream_filter_append($fp, "string.rot13", -49);
fwrite($fp, "This is a test\n");
rewind($fp);
fpassthru($fp);
fclose($fp);

var_dump(file_get_contents($filename));

@unlink($filename);

echo "Done\n";
?>
--EXPECT--
string(15) "Guvf vf n grfg
"
Done