Home  >  Article  >  Backend Development  >  List of common functions in PHP5 (share)_PHP tutorial

List of common functions in PHP5 (share)_PHP tutorial

WBOY
WBOYOriginal
2016-07-21 15:07:551085browse

As shown below:

Copy the code The code is as follows:

The usleep() function delays code execution for a number of microseconds.
The unpack() function unpacks data from a binary string.
The uniqid() function generates a unique ID based on the current time in microseconds.
 The time_sleep_until() function delays code execution until the specified time.
 The time_nanosleep() function, a commonly used function in PHP5, delays code execution for a number of seconds and nanoseconds.
 The sleep() function delays code execution for a few seconds.
 The show_source() function performs syntax highlighting on files.
The strip_whitespace() function returns the source code file with PHP comments and whitespace characters removed.
 The pack() function loads data into a binary string.
 ignore_user_abort() function sets whether disconnecting from the client will terminate the execution of the script.
 The highlight_string() function performs syntax highlighting on strings.
 The highlight_file() function performs syntax highlighting on files.
The get_browser() function, a commonly used function in PHP5, returns the performance of the user's browser.
The exit() function outputs a message and exits the current script.
 The eval() function calculates the string according to the PHP code.
The die() function outputs a message and exits the current script.
 The defined() function checks whether a constant exists.
 The define() function defines a constant.
 constant() function returns the value of a constant.
The connection_status() function, a commonly used function in PHP5, returns the current connection status.
 The connection_aborted() function checks whether the client is disconnected.
The zip_read() function reads the next file in the opened zip archive.
 The zip_open() function opens a ZIP file for reading.
 The zip_entry_read() function gets the contents from the opened zip archive entry.
The zip_entry_open() function opens a ZIP archive entry for reading.
The zip_entry_name() function, a commonly used function in PHP5, returns the name of the zip file item.
The zip_entry_filesize() function returns the original size of the zip archive entry (before compression).
 The zip_entry_compressionmethod() function returns the compression method of the zip archive entry.
 The zip_entry_compressedsize() function returns the compressed file size of the zip archive entry.
 The zip_entry_close() function closes the zip archive file opened by the zip_entry_open() function.
 The zip_close() function closes the zip archive file opened by the zip_open() function.
The xml_set_unparsed_entity_decl_handler() function specifies the function to be called when an unresolved entity name (NDATA) declaration is encountered.
The xml_set_processing_instruction_handler() function specifies the function to be called when the parser finds a processing instruction in the XML document.
The xml_set_object() function allows the use of XML parsers on objects.
The xml_set_notation_decl_handler() function of PHP5 commonly used functions specifies the function to be called when the parser finds a symbol declaration in the XML document.
The xml_set_external_entity_ref_handler() function specifies the function to be called when the parser finds an external entity in the XML document.
The xml_set_element_handler() function establishes the starting and ending element handlers.
The xml_set_default_handler() function establishes the default data handler for the XML parser.
The xml_set_character_data_handler() function creates a character data handler.
 The xml_parser_set_option() function sets options for the XML parser.
The xml_parser_get_option() function gets option setting information from the XML parser.
 xml_parser_free() function frees the XML parser.
 The xml_parser_create() function, a commonly used function in PHP5, creates an XML parser.
The xml_parser_create_ns() function creates an XML parser with namespace support.
 xml_parse_into_struct() function parses XML data into an array.
 xml_parse() function parses XML documents.
 xml_get_error_code() function gets the XML parser error code.
 xml_get_current_line_number() function gets the current line number of the XML parser.
 xml_get_current_column_number() function gets the current column number of the XML parser.
The xml_get_current_byte_index() function, a commonly used function in PHP5, obtains the current byte index of the XML parser.
The xml_error_string() function gets the error description of the XML parser.
 utf8_encode() function encodes ISO-8859-1 string into UTF-8.
 utf8_decode() function decodes UTF-8 string into ISO-8859-1.
 The wordwrap() function wraps the string according to the specified length.
The vsprintf() function writes the formatted string into a variable.
The vprintf() function outputs a formatted string.
The vfprintf() function writes the formatted string to the specified output stream.
 The ucwords() function, a commonly used function in PHP5, converts the first character of each word in the string to uppercase.
 ucfirst() function converts the first character in the string to uppercase.
 The trim() function removes whitespace characters and other predefined characters from both ends of a string.
 The substr_replace() function replaces part of a string with another string.
 The substr_count() function counts the number of times a substring appears in a string.
 The substr_compare() function compares two strings from the specified starting length.
The substr() function returns a part of a string.
 strtr() function converts specific characters in a string.
The strtoupper() function converts a string to uppercase.
The strtolower() function converts a string to lowercase.
The strtok() function, a commonly used function in PHP5, splits a string into smaller strings.
 The strstr() function searches for the first occurrence of a string in another string.
 The strspn() function returns the number of specific characters contained in a string.
 The strrpos() function finds the last occurrence of a string in another string.
 The strripos() function finds the last occurrence of a string within another string.
 strrev() function reverses a string.
The strrchr() function finds the last occurrence of a string in another string and returns all characters from that position to the end of the string.
 The strpos() function returns the position of the first occurrence of a string in another string.
The strpbrk() function, a commonly used function in PHP5, searches for any one of the specified characters in a string.
 The strncmp() function compares two strings.
 The strncasecmp() function compares two strings.
The strnatcmp() function uses a "natural" algorithm to compare two strings.
The strnatcasecmp() function uses a "natural" algorithm to compare two strings.
 strlen() function returns the length of the string.
 The stristr() function finds the first occurrence of a string in another string.
 The stripos() function returns the position of the first occurrence of a string in another string.
The stripslashes() function removes the backslashes added by the addslashes() function.
 The stripcslashes() function removes the backslashes added by the addcslashes() function.
 The strip_tags() function strips HTML, XML and PHP tags.
The strcspn() function returns the number of characters searched in a string before any specified character is found.
The strcoll() function, a commonly used function in PHP5, compares two strings.
 strcmp() function compares two strings.
 The strchr() function searches for the first occurrence of a string in another string.
 strcasecmp() function compares two strings.
 str_word_count() function counts the number of words in a string.
 str_split() function splits a string into an array.
The str_shuffle() function randomly shuffles all characters in a string.
 The str_rot13() function performs ROT13 encoding on a string.
The str_replace() function uses a string to replace other characters in a string.
 str_repeat() function repeats a string a specified number of times.
 str_pad() function pads the string to the specified length.
The str_ireplace() function uses a string to replace other characters in a string.
 The sscanf() function, a commonly used function in PHP5, parses input from a string according to the specified format.
The sprintf() function writes the formatted string into a variable.
 The soundex() function calculates the soundex key of a string.
The similar_text() function counts the number of matching characters in two strings.
The sha1_file() function calculates the SHA-1 hash of a file.
 The sha1() function calculates the SHA-1 hash of a string.
Setlocale() function sets regional information (regional information).
 PHP5 commonly used functions rtrim() P rtrim() function

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/327504.htmlTechArticle is as follows: Copy the code as follows: The usleep() function delays the execution of the code for a few microseconds. The unpack() function unpacks data from a binary string. The uniqid() function is based on microseconds...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn