PHP5 common function list (SHARE)

Source: Internet
Author: User
Tags processing instruction xml parser
This article provides a detailed analysis of common PHP5 functions. For more information, see

This article provides a detailed analysis of common PHP5 functions. For more information, see

As follows:

The Code is as follows:


The usleep () function delays code execution in several microseconds.
The unpack () function unpacks data from binary strings.
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 of PHP5 commonly used functions delays code execution for several seconds and receiving seconds.
The sleep () function delays code execution for several seconds.
The show_source () function highlights the File Syntax.
The strip_whitespace () function returns the source code files that have deleted the PHP comments and blank characters.
The pack () function loads data into a binary string.
The ignore_user_abort () function sets whether the script execution is terminated when the client is disconnected.
The highlight_string () function highlights the syntax of the string.
The highlight_file () function highlights the syntax of the file.
The get_browser () function of common PHP5 functions returns the performance of your browser.
The exit () function outputs a message, the Hong Kong server is rented, and the current script is exited.
The eval () function calculates the string according to the PHP code.
The die () function outputs a message, Vm, and exits the current script.
The defined () function checks whether a constant exists.
The define () function defines a constant.
The constant () function returns the constant value.
The connection_status () function of common PHP5 functions 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 file.
The zip_open () function opens the ZIP file for reading.
The zip_entry_read () function retrieves content from the open zip file project.
The zip_entry_open () function opens a ZIP file project for reading.
The zip_entry_name () function of PHP5 common functions returns the name of the zip file project.
The zip_entry_filesize () function returns the original size of the zip file project (before compression ).
The zip_entry_compressionmethod () function returns the zip file project compression method.
The zip_entry_compressedsize () function returns the compressed file size of the zip file project.
The zip_entry_close () function closes the zip file opened by the zip_entry_open () function.
The zip_close () function closes the zip file opened by the zip_open () function.
The xml_set_unparsed_entity_decl_handler () function specifies the function to be called when an unresolvable Object Name (NDATA) declaration is encountered.
The xml_set_processing_instruction_handler () function specifies the function called when the parser finds the Processing Instruction in the XML document.
The xml_set_object () function allows the XML parser to be used in objects.
The xml_set_notation_decl_handler () function of PHP5 common functions specifies the function called when the parser finds the symbol declaration in the XML document.
The xml_set_external_entity_ref_handler () function specifies the function called when the parser finds an external entity in the XML document.
The xml_set_element_handler () function establishes the start and end element processor.
The xml_set_default_handler () function creates a default data processor for the XML parser.
The xml_set_character_data_handler () function creates a character data processor.
The xml_parser_set_option () function sets options for the XML parser.
The xml_parser_get_option () function obtains the option setting information from the XML parser.
The xml_parser_free () function releases the XML parser.
The xml_parser_create () function of common PHP5 functions creates an XML parser.
The xml_parser_create_ns () function creates an XML parser with namespace support.
The xml_parse_into_struct () function parses XML data into an array.
The xml_parse () function parses the XML document.
The xml_get_error_code () function gets the error code of the XML parser.
The xml_get_current_line_number () function gets the current row number of the XML parser.
The xml_get_current_column_number () function gets the current column number of the XML parser.
The xml_get_current_byte_index () function of common PHP5 functions gets the Current byte index of the XML parser.
The xml_error_string () function gets the error description of the XML parser.
The utf8_encode () function encodes the ISO-8859-1 string into a UTF-8.
The utf8_decode () function decodes the UTF-8 string into a ISO-8859-1.
The wordwrap () function returns a string of the specified length.
The vsprintf () function writes the formatted string to the variable.
The vprintf () function outputs formatted strings.
The vfprintf () function writes formatted strings to the specified output stream.
The ucwords () function of PHP5 common functions converts the first character of each word in a string to uppercase.
The ucfirst () function converts the first character in the string to uppercase.
The trim () function removes spaces and other predefined characters from both ends of the string.
The substr_replace () function replaces one part of the string with another.
The substr_count () function calculates the number of times a substring appears in a string.
The substr_compare () function compares two strings from the specified start length.
The substr () function returns part of the string.
The strtr () function converts special characters in a string.
The strtoupper () function converts a string to uppercase.
The strtolower () function converts a string to lowercase.
The strtok () function of PHP5 common functions divides strings 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 the string.
The strrpos () function is used to locate the last occurrence of a string in another string.
The strripos () function is used to locate the last occurrence of a string in another string.
The strrev () function reverses the string.
The strrchr () function finds the position of the last occurrence of a string in another string, and returns all characters from this position to the end of the string.
The strpos () function returns the position where the string first appears in another string.
The strpbrk () function of PHP5 is used to search for any 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.
The strlen () function returns the length of the string.
The stristr () function is used to locate the first occurrence of a string in another string.
The stripos () function returns the position where the string first appears in another string.
The stripslashes () function deletes the backslash added by the addslashes () function.
The stripcslashes () function deletes the backslash added by the addcslashes () function.
The strip_tags () function removes tags from HTML, XML, and PHP.
The strcspn () function returns the number of characters searched in the string on the U.S. server before any specified character is found.
The strcoll () function of PHP5 common functions compares two strings.
The strcmp () function compares two strings.
The strchr () function searches for the first occurrence of a string in another string.
The strcasecmp () function compares two strings.
The str_word_count () function calculates the number of words in a string.
The str_split () function separates strings into arrays.
The str_shuffle () function randomly disconnects All characters in the string.
The str_rot13 () function executes the ROT13 encoding on the string.
The str_replace () function uses one string to replace other characters in the string.
The str_repeat () function repeats the specified number of times.
The str_pad () function fills the string with the specified length.
The str_ireplace () function uses one string to replace other characters in the string.
The sscanf () function of PHP5 common functions parses input from a string according to the specified format.
The sprintf () function writes formatted strings to a variable.
The soundex () function calculates the soundex key of a string.
The similar_text () function calculates the number of matching characters for two strings.
SHA-1 hash of the function compute file.
Sha1 () function calculates the SHA-1 hash of the string.
The setlocale () function sets region information (region information ).
Rtrim () P rtrim () function of common PHP5 Functions

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.