http_chunked_decode
(PECL pecl_http:0.1.0-1.5.5)
http_chunked_decode — chunked-encoded データをデコードする
説明
string http_chunked_decode
( string $encoded
)
HTTP-chunked エンコードされた文字列をデコードします。
パラメータ
- encoded
-
Chunked encode された文字列。
返り値
成功した場合はデコードした文字列、失敗した場合は FALSE を返します。
例
Example#1 http_chunked_decode() の例
<?php
$string = "".
"05\r\n".
"this \r\n".
"07\r\n".
"string \r\n".
"12\r\n".
"is chunked encoded\r\n".
"01\n\r\n".
"00";
echo http_chunked_decode($string);
?>
上の例の出力は以下となります。
this string is chunked encoded