Learn notes PHP string processing functions Summary _php Tutorial

Source: Internet
Author: User
Tags crc32 format definition php language sha1
PHP after a long period of development, many users are very familiar with PHP, here I published a personal understanding of the PHP string processing function, I hope to help everyone, PHP itself is a simple and powerful language.

The PHP language has core features such as powerful string and array processing capabilities, while greatly improving the support for object-oriented programming (PHP5 and above). By using standard and optional extensions, PHP applications can connect more than 10 databases such as MySQL or Oracle, draw, create PDF files, and create parsing XML files. You can also use the C language to write your own PHP extension module. For example, provide an interface function for PHP in a code base that already exists. You can also run PHP under Windows, use COM to control other Windows applications such as Word and Excel, or use ODBC to connect to a database, and here's a little bit of knowledge of PHP string handlers.

PHP String processing function Summary:

 
 
  1. addcslashes--adds a backslash escape character for some characters inside a string
  2. addslashes--characters inside a string are escaped in the specified manner
  3. bin2hex--converts binary data to hexadecimal notation
  4. chr--returns the ASCII code of a character
  5. chunk_split--divide a string into small pieces at a certain length of character
  6. convert_cyr_string--converting Slavic characters to other characters
  7. convert_uudecode--decrypting a string
  8. convert_uuencode--Encrypt a string
  9. count_chars--returns the character usage information for a string
  10. crc32--computes a crc32 polynomial of a string
  11. crypt--one-way hash encryption function
  12. explode--converts a string into an array form with a separator
  13. fprintf--returns data as required and writes directly to the document stream
  14. get_html_translation_table--returning HTML entities that can be converted
  15. Inverse of the html_entity_decode--htmlentities () function to convert HTML entities to characters
  16. htmlentities--convert some characters in a string to HTML entities
  17. Inverse of the htmlspecialchars_decode--htmlspecialchars () function to convert HTML entities to characters
  18. htmlspecialchars--convert some characters in a string to HTML entities
  19. implode--to convert an array to a string with a specific separator character
  20. join--convert an array to a string, alias of the Implode () function
  21. levenshtein--Calculate the difference size of two words
  22. localeconv--getting a number-related format definition
  23. ltrim--to remove whitespace to the left of a string or to a specified character
  24. md5_file--a file for MD5 algorithm encryption
  25. md5--a string for MD5 algorithm encryption
  26. metaphone--judging the pronunciation rules of a string
  27. money_format--output of numbers formatted according to parameters
  28. nl_langinfo--querying language and local information
  29. nl2br--Replace the line break "n" in the string with "
  30. number_format--output of numbers formatted according to parameters
  31. ord--converts an ASCII code to one character
  32. parse_str--Convert a string of a certain format into a variable and a value
  33. print--used to output a single value
  34. printf--data Display as required
  35. quoted_printable_decode--to encrypt a string into a 8-bit binary string
  36. quotemeta--to escape a number of specific characters
  37. rtrim--remove whitespace to the right of a string or a specified character
  38. setlocale--setting local formats for numbers, dates, and so on
  39. sha1_file--a file for SHA1 algorithm encryption
  40. sha1--a string for SHA1 algorithm encryption
  41. similar_text--compares two strings and returns the number of similar characters that the system thinks
  42. soundex--judging the pronunciation rules of a string
  43. The sprintf--returns the data as required, but does not output
  44. sscanf--can format a string
  45. str_ireplace--matches and replaces strings like the Str_replace () function, but is case insensitive
  46. str_pad--padding on both sides of a string
  47. str_repeat--repeating combinations of strings
  48. str_replace--matching and replacing strings
  49. str_rot13--string for ROT13 encryption processing
  50. str_shuffle--random ordering of characters inside a string
  51. str_split--splits a string into an array by character spacing
  52. str_word_count--get the English word information inside the string
  53. strcasecmp--size comparison of strings, case insensitive
  54. strchr--the alias of a partial strstr () function that returns a string by comparison
  55. strcmp--size comparison of strings
  56. strcoll– size comparison of strings based on local settings
  57. strcspn--returns the value of a continuous non-matching length of characters
  58. strip_tags--remove HTML and PHP code from a string
  59. stripcslashes--inverse literal addcslashes () function escapes processed strings
  60. stripos--finds and returns the position of the first occurrence, matching is case-insensitive

http://www.bkjia.com/PHPjc/446515.html www.bkjia.com true http://www.bkjia.com/PHPjc/446515.html techarticle PHP After a long period of development, many users are very familiar with PHP, here I publish a personal understanding of the PHP string processing function, I hope to help everyone, PHP itself is a simple and powerful ...

  • 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.