projects
/
m6w6
/
ext-http
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
fe28774473a2526161359b9b90a332232373c453
[m6w6/ext-http]
/
tests
/
stream_filters_001.phpt
1
--TEST--
2
stream filters
3
--SKIPIF--
4
<?php
5
include 'skip.inc';
6
?>
7
--FILE--
8
<?php
9
echo "-TEST\n";
10
11
define('F', 'http.test_stream_filters');
12
13
$f = fopen(F, 'w');
14
stream_filter_append($f, 'http.chunked_encode');
15
16
fwrite($f, "Here ");
17
fwrite($f, "we");
18
fwrite($f, " go!\n");
19
fclose($f);
20
21
var_dump(file_get_contents(F));
22
23
$f = fopen(F, 'r');
24
stream_filter_append($f, 'http.chunked_decode');
25
var_dump(fread($f, 256));
26
27
echo "Done\n";
28
--EXPECTF--
29
%sTEST
30
string(27) "5
31
Here
32
2
33
we
34
5
35
go!
36
37
"
38
string(12) "Here we go!
39
"
40
Done