Learning notes PHP string processing function summary. PHP has been developing for a long time and many users are familiar with PHP. here I will post my personal understanding of PHP string processing functions, hoping to help you, PHP itself is a simple and powerful PHP. after a long period of development, many users know PHP very well. here I will share my personal understanding of PHP string processing functions and hope to help you, PHP itself is a simple and powerful language.
PHP has core features such as powerful string and array processing capabilities, and greatly improved support for object-oriented programming (PHP5 and later versions ). Using standard and optional extension modules, PHP applications can connect to more than a dozen databases such as MySQL or Oracle, draw, create PDF files, and create parsed XML files. You can also use the C language to write your own PHP extension module. For example, provide a PHP interface function in an existing code library. You can also run PHP in Windows, use COM to control other Windows applications such as Word and Excel, or use ODBC to connect to the database, the following is a summary of PHP string processing functions.
Summary of PHP string processing functions:
- Addcslashes -- add backslash escape characters to some characters in the string
- Addslashes -- escape characters in a string in a specified way
- Bin2hex -- Convert binary data to hexadecimal representation
- 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
- Explode -- convert a string into an array using a delimiter
- Fprintf -- return data as required and directly write data to the document stream
- Get_html_translation_table -- returns the HTML entity that can be converted.
- Html_entity_decode -- the inverse function of the htmlentities () function, which converts an HTML object to a character
- Htmlentities -- convert some characters in a string into HTML entities
- Htmlspecialchars_decode -- the inverse function of the htmlspecialchars () function, which converts HTML objects to characters.
- Htmlspecialchars -- Converts some characters in a string to HTML entities
- Implode -- convert an array into a string using a specific delimiter
- Join -- convert an array into a string, alias of the implode () function
- Levenshtein -- calculate the difference between two words
- Localeconv -- get format definitions related to numbers
- Ltrim -- removes white spaces 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 -- determines the pronunciation rules of a string
- Money_format -- format the output of numbers based on parameters
- Nl_langinfo -- Query language and local information
- Nl2br -- replace the linefeed "n" in the string with "n"
- "
- Number_format -- format the output of numbers based on parameters
- Ord: converts an ASCII code to a character.
- Parse_str -- convert a string of a certain format to a variable and a value
- Print -- used to output a separate value
- Printf -- Display data as required
- Quoted_printable_decode -- encrypt a string into an 8-bit binary string
- Quotemeta -- escape several specific characters
- Rtrim -- remove the white space or specified characters on the right of the string
- Setlocale -- set the local format of 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-rules for determining the pronunciation of a string
- Sprintf -- return data as required, but no output
- Sscanf -- you can format strings.
- Str_ireplace -- matches and replaces strings like the str_replace () function, but is case insensitive.
- Str_pad -- pad both sides of the string
- Str_repeat -- repeat the string
- Str_replace -- match and replace strings
- Str_rot13 -- encrypt the string with ROT13
- 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 -- get the English word information in the string
- Strcasecmp -- compare the string size, case insensitive
- Strchr -- returns the alias of some strstr () functions of a string through comparison.
- Strcmp -- compare the size of a string
- Strcoll-compare the string size based on local settings
- Strcspn -- returns the value of consecutive non-matching lengths.
- Strip_tags -- remove the HTML and PHP code in a string
- Stripcslashes -- returns the string processed by the addcslashes () function escape function.
- Stripos -- locate and return the position of the first matching item. the matching is case insensitive.
...