String function Library: Count_chars

Source: Internet
Author: User
Keywords count_chars php Chinese Function Handbook
Tags aliyun count_chars function function library html http information php

Count_chars

(PHP4 >= 4.0b4)

Count_chars---&http://www.aliyun.com/zixun/aggregation/37954.html ">nbsp; Returns information about the characters used in a string

Syntax: Mixed Count_chars (String string [, Mode])

Description:

Calculates the number of occurrences of each byte-value (0..255) in the parameter string, and returns it in various ways, depending on the parameter mode (preset 0) to determine how the Count_chars () is passed back.

0-Returns an array whose index value is Byte-value and the value of the array is the number of occurrences per bit

1-Same as 0, but only byte-value greater than 0 are listed

2-and 0 is the same, but only byte-value equal to zero will be listed

3-Returns all strings using Byte-value

4-Returns all strings that do not use Byte-value

Note: This function is a new function in PHP4.0

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.