Tools Tags
PHP tutorial
PHP tutorial
Introduction to PHP
PHP installation
PHP syntax
PHP variables
PHP echo/print
PHP data types
PHP constants
PHP string
PHP operators
PHP If...Else
PHP Switch
PHP array
PHP array sorting
PHP super global variables
PHP While Loop
PHP For Loop
PHP functions
PHP magic constants
PHP namespace
PHP object-oriented
PHP EOF(heredoc)
PHP type comparison
directory
Tools Tags
PHP tutorial
PHP tutorial
Introduction to PHP
PHP installation
PHP syntax
PHP variables
PHP echo/print
PHP data types
PHP constants
PHP string
PHP operators
PHP If...Else
PHP Switch
PHP array
PHP array sorting
PHP super global variables
PHP While Loop
PHP For Loop
PHP functions
PHP magic constants
PHP namespace
PHP object-oriented
PHP EOF(heredoc)
PHP type comparison
PHP String
PHP 5 String Function
PHP String function is an integral part of the core of PHP. No installation is required to use these functions.
| Function | Description |
|---|---|
| ##addcslashes() | Returns a string with a backslash preceding the specified character.|
| Returns a string with backslashes added before predefined characters. | |
| bin2hex() | Convert a string of ASCII characters to a hexadecimal value.|
| chop() | Remove whitespace characters or other characters on the right side of the string.|
| chr() | Returns characters from the specified ASCII value.|
| chunk_split() | Split the string into a series of smaller parts.|
| Convert a string from one Cyrillic character set to another. | |
| Decode the uuencode encoded string. | |
| Encode a string using the uuencode algorithm. | |
| count_chars() | Returns information about the characters used in the string.|
| Calculate the 32-bit CRC (Cyclic Redundancy Check) of a string. | |
| One-way string encryption (hashing). | |
| Output one or more strings. | |
| explode() | Break up the string into an array.|
| Write the formatted string to the specified output stream. | |
| Returns the translation table used by htmlspecialchars() and htmlentities(). | |
| Convert Hebrew text to visible text. | |
| Convert Hebrew text to visible text, and convert new lines (\n) to <br>. | |
| hex2bin() | Convert a string of hexadecimal values to ASCII characters. |
| html_entity_decode() | Convert HTML entities to characters. |
| htmlentities() | Convert characters to HTML entities. |
| htmlspecialchars_decode() | Convert some predefined HTML entities into characters. |
| htmlspecialchars() | Convert some predefined characters into HTML entities. |
| implode() | Returns a string composed of array elements. |
| join() | An alias for implode(). |
| lcfirst() | Convert the first character in the string to lowercase. |
| levenshtein() | Returns the Levenshtein distance between two strings. |
| localeconv() | Returns local number and currency format information. |
| ltrim() | Remove whitespace characters or other characters on the left side of the string. |
| md5() | Computes the MD5 hash of a string. |
| md5_file() | Calculate the MD5 hash of the file. |
| metaphone() | Calculate the metaphone key of a string. |
| money_format() | Returns a string formatted as a currency string. |
| nl_langinfo() | Return the specified local information. |
| nl2br() | Insert an HTML newline character before each new line in the string. |
| number_format() | Format a number by thousands grouping. |
| ord() | Returns the ASCII value of the first character in the string. |
| parse_str() | Parse the query string into variables. |
| print() | Output one or more strings. |
| printf() | Output formatted string. |
| quoted_printable_decode() | Convert quoted-printable string to 8-bit string. |
| quoted_printable_encode() | Convert 8-bit string to quoted-printable string. |
| quotemeta() | Quote metacharacters. |
| rtrim() | Remove whitespace characters or other characters on the right side of the string. |
| setlocale() | Set regional information (regional information). |
| sha1() | Computes the SHA-1 hash of a string. |
| sha1_file() | Compute the SHA-1 hash of a file. |
| similar_text() | Calculate the similarity of two strings. |
| soundex() | Calculate the soundex key of a string. |
| sprintf() | Write the formatted string into a variable. |
| sscanf() | Parses input from a string according to the specified format. |
| str_getcsv() | Parse the CSV string into an array. |
| str_ireplace() | Replace some characters in the string (case insensitive). |
| str_pad() | Padding the string to the new length. |
| str_repeat() | Repeat the string the specified number of times. |
| str_replace() | Replace some characters in the string (case sensitive). |
| str_rot13() | Perform ROT13 encoding on a string. |
| str_shuffle() | Randomly shuffles all characters in the string. |
| str_split() | Split the string into an array. |
| str_word_count() | Count the number of words in a string. |
| strcasecmp() | Compares two strings (case insensitive). |
| strchr() | Find the first occurrence of a string in another string. (Alias for strstr().) |
| strcmp() | Compares two strings (case sensitive). |
| strcoll() | Compares two strings (according to local settings). |
| strcspn() | Returns the number of characters to search in a string before any of the specified characters are found. |
| strip_tags() | Strip HTML and PHP tags from a string. |
| stripcslashes() | Remove backslashes added by the addcslashes() function. |
| stripslashes() | Remove backslashes added by addslashes() function. |
| stripos() | Returns the position of the first occurrence of a string in another string (case insensitive). |
| stristr() | Find the first occurrence of a string in another string (case insensitive). |
| strlen() | Returns the length of the string. |
| strnatcasecmp() | Uses a "natural ordering" algorithm to compare two strings (case insensitive). |
| strnatcmp() | Uses a "natural ordering" algorithm to compare two strings (case sensitive). |
| strncasecmp() | String comparison of the first n characters (case insensitive). |
| strncmp() | String comparison of the first n characters (case sensitive). |
| strpbrk() | Search for any one of the specified characters in the string. |
| strpos() | Returns the position of the first occurrence of a string in another string (case sensitive). |
| strrchr() | Find the last occurrence of a string in another string. |
| strrev() | Reverse a string. |
| strripos() | Find the last occurrence of a string in another string (case insensitive). |
| strrpos() | Find the last occurrence of a string in another string (case sensitive). |
| strspn() | Returns the number of specific characters contained in a string. |
| strstr() | Find the first occurrence of a string in another string (case sensitive). |
| strtok() | Split the string into smaller strings. |
| strtolower() | Convert the string to lowercase letters. |
| strtoupper() | Convert the string to uppercase letters. |
| strtr() | Convert specific characters in the string. |
| substr() | Returns a part of the string. |
| substr_compare() | Compares two strings starting at the specified starting position (binary safe and selective case sensitive). |
| Count the number of times a substring appears in a string. | |
| substr_replace() | Replace part of a string with another string. |
| trim() | Remove whitespace and other characters on both sides of the string. |
| ucfirst() | Convert the first character in the string to uppercase. |
| ucwords() | Convert the first character of each word in the string to uppercase. |
| vfprintf() | Write the formatted string to the specified output stream. |
| vprintf() | Output formatted string. |
| vsprintf() | Write the formatted string into the variable. |
| wordwrap() | Wraps the string according to the specified length. |
Hot AI Tools
Undress AI Tool
Undress images for free
AI Clothes Remover
Online AI tool for removing clothes from photos.
Undresser.AI Undress
AI-powered app for creating realistic nude photos
ArtGPT
AI image generator for creative art from text prompts.
Stock Market GPT
AI powered investment research for smarter decisions
Hot Article
How to fix a monitor's color looking washed out or yellow?
4 weeks ago By 下次还敢
How to add subtitles in premiere
3 weeks ago By 下次还敢
How to cancel the continuous monthly subscription on Youku? [Steps] to unbind Alipay as a Youku member
1 months ago By DDD
How to resolve 'Windows cannot find a driver for your network adapter' (Ethernet)?
3 weeks ago By 下次还敢
Cyberpunk 2077 Officially Returns In 2026 With A New Kind Of Game
4 weeks ago By Jack chen
Hot Topics
# Douyin level price list 1-75
20448
7
20448
7
# wifi shows no ip assigned
13592
4
13592
4
Popular tool
Notepad++7.3.1
Easy-to-use and free code editor
SublimeText3 Chinese version
Chinese version, very easy to use
Zend Studio 13.0.1
Powerful PHP integrated development environment
Dreamweaver CS6
Visual web development tools
SublimeText3 Mac version
God-level code editing software (SublimeText3)












![Getting Started with PHP Practical Development: PHP Quick Creation [Small Business Forum]](https://img.php.cn/upload/course/000/000/035/5d27fb58823dc974.jpg)