Common php string functions

Source: Internet
Author: User
What is the string function commonly used by php to process addcslashes? Add backslash escape characters to some characters in the string
Addslashes? Escape characters in a string in the specified way
Bin2hex? Convert binary data to hexadecimal representation
Chop? Alias function of rtrim ()
Chr? Returns the ASCII code of a character.
Chunk_split? Splits a string into small parts based on a certain character length
Convert_cyr_string? Converts a Slavic character to another character.
Convert_uudecode? Decrypts a string
Convert_uuencode? Encrypt a string
Count_chars? Returns the character usage information in a string.
Crc32? Calculate the crc32 polynomial of a string
Crypt? One-way hash encryption function
Echo? Used to display some content
Explode? Converts a string into an array using a delimiter.
Fprintf? Return data as required and directly write the data to the document stream
Get_html_translation_table? Returns the HTML entity that can be converted.
Hebrev? Converts a Hebrew-encoded string to a visualized text.
Hebrevc? Converts a Hebrew-encoded string to a visualized text.
Html_entity_decode? The inverse function of the htmlentities () function, which converts an HTML object to a character.
Htmlentities? Converts some characters in a string to an HTML object.
Htmlspecialchars_decode? The inverse function of the htmlspecialchars () function, which converts an HTML object to a character.
Htmlspecialchars? Converts some characters in a string to an HTML object.
Implode? Converts an array into a string using a specific delimiter.
Join? Convert the array into a string, the alias of the implode () function
Levenshtein? Calculate the differences between two words
Localeconv? Get format definitions related to numbers
Ltrim? Removes the white space or specified characters on the left of the string.
Md5_file? Encrypt an object using the MD5 algorithm
Md5? Encrypt a string using the MD5 algorithm
Metaphone? Determine the pronunciation rules of a string
Money_format? Formatted output of numbers based on parameters
Nl_langinfo? Query language and local information
Nl2br? Replace the linefeed "\ n" in the string with"
"
Number_format? Formatted output of numbers based on parameters
Ord? Converts an ASCII code to a character.
Parse_str? Convert a string in a certain format to a variable and a value.
Print? Used to output a separate value
Printf? Display data as required
Quoted_printable_decode? Encrypts a string into an 8-bit binary string.
Quotemeta? Escape certain characters
Rtrim? Removes the white space or specified characters on the right of the string.
Setlocale? Set local formats for numbers, dates, and so on
Sha1_file? Encrypt a file using the SHA1 algorithm
Sha1? Encrypt a string using the SHA1 algorithm
Similar_text? Compares two strings and returns the number of similar characters that the system considers.
Soundex? Determine the pronunciation rules of a string
Sprintf? Return data as required, but do not output
Sscanf? You can format strings.
Str_ireplace? Matches and replaces strings like the str_replace () function, but is case insensitive.
Str_pad? Complement both sides of the string
Str_repeat? Repeat string combination
Str_replace? Match and replace strings
Str_rot13? Compress the character string to ROT13 for encryption.
Str_shuffle? Random Sorting of characters in a string
Str_split? Splits a string into an array based on the character spacing.
Str_word_count? Obtain the English word information in the string.
Strcasecmp? Compare the size of a string, case insensitive
Strchr? Returns the alias of some strstr () functions of a string by comparing them.
Strcmp? Compare the size of a string
Strcoll? Compare the string size based on local settings
Strcspns? Returns the value of consecutive unmatched lengths.
Strip_tags? Remove HTML and PHP code from a string
Stripcslashes? Returns the string processed by the addcslashes () function escape.
Stripos? Searches for and returns the location of the first match. The match is case insensitive.
Stripslashes? Returns the string that has been escaped by the implicit addslashes () function.
Stristr? Returns the part of a string by comparison. the comparison is case insensitive.
Strlen? Obtains the encoding length of a string.
Strnatcasecmp? Use the natural sorting method to compare the string size, case-insensitive
Strnatcmp? Use the natural sorting method to compare the string size
Strncasecmp? Compare the size of the first N characters of a string, which is case insensitive.
Strncmp? Compare the size of the first N characters of a string
Strpbrk? Returns the part of a string through comparison.
Strpos? Find and return the location of the first matching item
Strrchr? Returns the part of a string by comparing it from the back to the back.
Strrev? Sort all letters in the string in reverse order
Strripos? Search from the back and return the position of the first matching item. the matching is case insensitive.
Strrpos? Search from the back and return the position of the first matching item
Strspns? Returns the consecutive length of a character.
Strstr? Returns the part of a string through comparison.
Strtok? Splits a string by a specified number of characters.
Strtolower? Convert string to lowercase
Strtoupper? Convert string to uppercase
Strtr? Replace string
Substr_compare? Comparison after string truncation
Substr_count? Calculates the number of occurrences of a character segment in a string.
Substr_replace? Replaces some characters in the string.
Substr? Truncates a string.
Trim? Removes spaces or specified characters on both sides of the string.
Ucfirst? Converts the first letter of the given string to uppercase.
Ucwords? Converts the first letter of each English word of the given string into uppercase letters.
Vfprintf? Return data as required and directly write the data to the document stream
Vprintf? Display data as required
Vsprintf? Return data as required, but do not output
Wordwrap? Splits a string according to a certain character length.

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.