Home  >  Article  >  Backend Development  >  How to use PHP function pack to process data_PHP tutorial

How to use PHP function pack to process data_PHP tutorial

WBOY
WBOYOriginal
2016-07-15 13:33:43895browse

We are learning

PHP function pack definition:

Compress data into a bit string.

Syntax:

string pack(string format, mixed [args]...);

Return value:

String

PHP function pack type:

Data processing

PHP function Pack content description

This function is used to compress and pack data into a string. This function has exactly the same functionality and usage as the Perl function of the same name. The parameter format is the compressed format

<ol class="dp-xml"><li class="alt"><span><span class="tag"><?</span><span class="tag-name">php</span><span> </span></span></li><li><span>echo pack("C3",80,72,80);  </span></li><li class="alt"><span class="tag">?></span><span> </span></span></li></ol>

Output:

PHP

The above is the definition and usage of PHP function pack.


www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/446035.htmlTechArticleWe are learning the definition of PHP function pack: Compress data into a bit string. Syntax: string pack(string format, mixed [args]...); Return value: String PHP function pack type: Data processing...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn