php character conversion functions include: 1. addcslashes function; 2. addslashes function; 3. bin2hex function; 4. fprintf function; 5. hebrev function; 6. hex2bin function, etc.
Recommended: "PHP Video Tutorial"
php character conversion functions are:
addcslashes — Use backslashes to escape characters in a string in C style
addslashes — Use backslashes to quote strings
bin2hex — Function that converts a string containing data Convert a binary string to a hexadecimal value
chop — Alias for rtrim
chr — Return the specified character
chunk_split — Split a string into small chunks
convert_cyr_string — Convert characters from one Cyrillic character to another
convert_uudecode — Decode a uuencode-encoded string
convert_uuencode — Use uuencode to encode a string
count_chars — Returns information about the characters used in a string
crc32 — Computes the crc32 polynomial of a string
crypt — One-way string hashing
echo — Output One or more strings
explode — Use one string to split another string
fprintf — Write the formatted string to the stream
get_html_translation_table — Returns the conversion table using htmlspecialchars and htmlentities
hebrev — Convert logical-Hebrew to visual-Hebrew
hebrevc — Convert logical-Hebrew to visual-Hebrew and convert newlines
hex2bin — Convert hexadecimal string to binary string
html_entity_decode — Convert HTML entities to their corresponding characters
htmlentities — Convert characters to HTML escaped characters
htmlspecialchars_decode — Convert special HTML entities back to normal characters
htmlspecialchars — Convert special characters to HTML entities
implode — Convert a one-dimensional array of values into a string
join — Alias implode
lcfirst — Make The first character of a string is lowercase
levenshtein — Calculate the edit distance between two strings
localeconv — Get numeric formatting information
ltrim — Delete a string Leading whitespace characters (or other characters)
md5_file — Calculate the MD5 hash value of the specified file
md5 — Calculate the MD5 hash value of a string
metaphone — Calculate the metaphone key of a string
money_format — Format a number into a currency string
nl_langinfo — Query language and locale information
nl2br — Insert before all new lines in the string HTML line break tag
number_format — Format a number with thousand separators
ord — Convert the first byte of a string to a value between 0-255
parse_str — Parse a string into multiple variables
print — Output a string
printf — Output a formatted string
quoted_printable_decode — Convert a quoted-printable string For 8-bit strings
quoted_printable_encode — Convert an 8-bit string to a quoted-printable string
quotemeta — Escape metacharacter set
rtrim — Remove characters White space characters (or other characters) at the end of the string
setlocale — Set locale information
sha1_file — Calculate the sha1 hash value of the file
sha1 — Calculate the sha1 hash value of the string Column value
similar_text — Calculate the similarity of two strings
soundex — Calculate the soundex key of a string
sprintf — Return a formatted string
sscanf — Parse input characters according to the specified format
str_getcsv — Parse a CSV string into an array
str_ireplace — A case-ignoring version of str_replace
str_pad — Use another String padding string to the specified length
str_repeat — Repeat a string
str_replace — Substring replacement
str_rot13 — Perform ROT13 conversion on a string
str_shuffle — Randomly shuffle a string
str_split — Convert a string into an array
str_word_count — Return the usage of words in a string
strcasecmp — Binary safe Compare strings (case-insensitive)
strchr — alias strstr
strcmp — Binary-safe string comparison
strcoll — Locale-based string comparison
strcspn — Get the length of the starting substring of a non-matching mask
strip_tags — Strip HTML and PHP tags from a string
stripcslashes — Dequote an escape using addcslashes Strings
stripos — Find the first occurrence of a string (case-insensitive)
stripslashes — Backquote a quoted string
stristr — Ignore the strstr function Uppercase and lowercase versions
strlen — Gets the length of a string
strnatcasecmp — Compares strings using the “natural order” algorithm (case-insensitive)
strnatcmp — Uses the natural ordering algorithm Compare strings
strncasecmp — Binary safe comparison of several characters at the beginning of a string (case-insensitive)
strncmp — Binary safe comparison of several characters at the beginning of a string
strpbrk — In a string Find any character in a set of characters
strpos — Find the first occurrence of a string
strrchr — Find the last occurrence of a specified character in a string
strrev — Reverse a string
strripos — Calculate the position of the last occurrence of the specified string in the target string (case-insensitive)
strrpos — Calculate the position of the specified string in the target string Position of the last occurrence
strspn — Calculate the length of the first substring in the string in which all characters exist in the specified character set.
strstr — Find the first occurrence of a string
strtok — Mark split string
strtolower — Convert a string to lowercase
strtoupper — Convert a character Convert string to uppercase
strtr — Convert the specified character
substr_compare — Binary safe comparison of strings (compare specified length from offset position)
substr_count — Count occurrences of a string Times
substr_replace — Replace the substring of the string
substr — Return the substring of the string
trim — Remove the blank characters (or other characters) at the beginning and end of the string
ucfirst — Converts the first letter of a string to uppercase
ucwords — Converts the first letter of each word in a string to uppercase
vfprintf — Converts formatting characters String writing stream
vprintf — Output a formatted string
vsprintf — Return a formatted string
wordwrap — Break the string into a specified number of words
The above is the detailed content of What are the php character conversion functions?. For more information, please follow other related articles on the PHP Chinese website!