What we introduce to you today is String conversion functions for commonly used strings in PHP
addcslashes function: use backslashes to escape characters in strings in C language style
addslashes function: use backslashes Quote string
chop function: clear consecutive spaces in the string
get_html_translation_table function: return the conversion table of htmlspecialchars() function and htmlentities() function
chunk_split function: split the string into small pieces
hebrev function: Convert Hebrew logical characters to visible characters
hebrevc function: Convert Hebrew text to visible text, including line breaks
html_entity_decode function: Convert HTML character encoding to characters
htmlentities function: Convert characters to HTML character encoding
htmlspecialchars_decode function: Convert special HTML character encoding to characters
htmlspecialchars function: Convert special characters to HTML character encoding
nl2br function: Convert newline characters to "
"
quotemeta function: add quotation characters
rtrim function: clear the blank (or other characters) at the end of the string
strip_tags function: clear HTML and PHP tags
stripcslashes function: will be processed with addslashes() function The resulting string is returned as is
stripslashes function: clears the backslashes in the string
strtolower function: converts all letters in the string to lowercase
strtoupper function: converts all letters in the string is uppercase
trim function: intercept the spaces (or other characters) at the beginning and end of the string String operation function
explode function: cut the string according to the specified characters
str_pad function: fill another string with one string A string to a specified length
str_split function: convert the string into an array
str_shuffle function: randomly shuffle the order of characters in the string
str_ireplace function: replace a certain substring with another string
localeconv function: Get local digital and currency information
ltrim function: clear the continuous blanks (or other characters) at the left end of the string
money_format function: convert the numeric string into currency representation
nl_langinfo Function: Get language and region information
number_format function: Format a number string with thousand separators
parse_str function: Parse the string into a variable
setlocale function: Set region information
similar_text function: Count the number of matching strings in two strings
str_repeat function: reuse the specified string
str_replace function: case-sensitive string replacement
str_word_count function: return the number of words in the string
strcasecmp function: compare two strings
strlen function: count the length of strings
strnatcmp function: use natural order algorithm to compare strings
strrev function: reverse strings
strtok function: cut the string
strtr function: convert certain characters of the string
substr_count function: count the number of times one string appears in another string
substr_replace function: replace the characters in the string Part of it is another string
substr function: intercept the string
ucfirst function: change the first character in the string to uppercase
ucwords function: change the first letter of each word in the string Change to uppercase
wordwrap function: wrap the string according to the number of characters
PHP string search function for commonly used strings
chr function: convert the specified ordinal number into the corresponding ASCII code character
implode function: merge the array into a string
join function: convert the array into a string
crc32 function: calculate the crc32 polynomial of a string
strchr function: return the string in The substring from the first occurrence in another string to the end
strcspn function: Returns the length of the substring in the string that does not match the mask at the beginning
stripos function: Finds a string in another string The position of the first occurrence of a string in another string (case-insensitive)
stristr function: Returns the substring from the first occurrence of a string in another string to the end of the latter (case-insensitive)
strripos function : Case-insensitive search for the first occurrence of a character in a string
strrpos function: Search for the last position of a character in a string
strspn function: Returns the length of the first substring in the string that matches the mask
strstr function: Returns the string from the beginning to the end of a string in the string
String encoding functions for PHP commonly used strings
bin2hex function: Convert binary characters to Hexadecimal
convert_cyr_string function: Convert characters from one Cyrillic character to another
convert_uudecode function: Decode a string encoded with uuencode algorithm
convert_uuencode function: Encode a string with uuencode algorithm
count_chars function: returns information about all characters in the string
ord function: returns the ASCII code of a character
str_rot13 function: rot13 encoding a string
One of the commonly used strings in PHP String encryption functions
crypt function: encrypt the string with DES encoding
md5_file function: calculate the MD5hash of the given file
md5 function: perform MD5 encryption on a string
sha1_file function: calculate the sha1hash of the given file
echo function: output one or more characters
fprintf function: output a formatted string to the stream
print function: output a formatted string
printf function: output a formatted string
sprintf function: returns a formatted string to the variable
sscanf function: parses the input string according to a certain format
vfprintf function: outputs the formatted string to the stream
vprintf function: outputs a format transformed string
vsprintf function: output the formatted string to the variable
PHP commonly used string string comparison function
levenshtein function: calculate the Levenshtein of two strings distance
metaphone function: calculates the metaphone key of a string
soundex function: calculates the soundex key of a string
strcoll function: compares two strings
strcmp function: compares two strings
strnatcasecmp function: compare strings using natural arithmetic (not case sensitive)
strncasecmp function: compare the first n characters of strings (not case sensitive)
strncmp function: compare two strings The first n characters
strpbrk function: Find a series of characters in a string
strpos function: Find the first occurrence of a character in a string
strrchr function: Find a string in another string The position of the last occurrence in the string, and returns the substring starting from this position in the string to the end of the string
substr_compare function: Compares two strings within a certain length starting from the specified starting position (binary exact , case sensitive (optional)