(PECL pecl_http >= 0.1.0)
http_chunked_decode — Decode chunked-encoded data
$encoded
)Decodes a string which is HTTP-chunked encoded.
encoded
chunked encoded string
Returns the decoded string on success 或者在失败时返回 FALSE
.
Example #1 A http_chunked_decode() example
<?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