674510e5658fd83beed6d2fb7f104b8e217aaaf3
[mdref/mdref-http] / http / Encoding / Stream / Dechunk / decode.md
1 # static string http\Encoding\Stream\Dechunk::decode(string $data[, int &$decoded_len = 0])
2
3 Decode chunked encoded data.
4
5 ## Params:
6
7 * string $data
8 The data to decode.
9 * Optional reference int $decoded_len = 0
10 Out parameter with the length of $data that's been decoded.
11 Should be ```strlen($data)``` if not truncated.
12
13 ## Returns:
14
15 * string, the decoded data.
16 * string, the unencoded data.
17 * string, the truncated decoded data.
18 * false, if $data cannot be decoded.
19
20 ## Notices:
21
22 * If $data does not seem to be chunked encoded.
23
24 ## Warnings:
25
26 * If $data cannot be decoded or is truncated.