Share PHP Unpack function extract bit string implementation Tips _php Tutorial

Source: Internet
Author: User
Tags unpack
We used to tell our friends that

PHP unpack function definition

Unzip the bit string data.

Grammar:

String Pack (string format, mixed [args] ...);

return value:

Array

PHP Unpack function types:

Data processing

PHP Unpack Function Content description

This function is used to decompress the data of a bit string. This function is identical to Perl's function function with the same name. The parameter format is compressed.

PHP Unpack Function Example 1

 
  
  
  1. < ? PHP
  2. $ Data "PHP";
  3. Print_r (Unpack ("c*", $data));
  4. ?>

Output:

    1. Array
    2. (
    3. [1] =>
    4. [2] =>
    5. [3] =>
    6. )


http://www.bkjia.com/PHPjc/446032.html www.bkjia.com true http://www.bkjia.com/PHPjc/446032.html techarticle we have introduced to our friends the PHP unpack function to define the extracted bit string data. Syntax: string Pack (string format, mixed [args] ...); Return value: Array PHP unpack function type ...

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.