PHP5 Common Function list (sharing) _php tips

Source: Internet
Author: User
Tags error code hash processing instruction rtrim unpack unique id xml parser zip archive file
As shown below:
Copy Code code as follows:

The Usleep () function delays code execution for several microseconds.
The unpack () function unpack the 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.
PHP5 the Time_nanosleep () function of a common function delays code execution for several seconds and nanoseconds.
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 for the deleted PHP annotations and whitespace characters.
The pack () function loads data into a binary string.
The Ignore_user_abort () function setting terminates the execution of the script if it disconnects from the client.
The highlight_string () function displays syntax highlighting for strings.
The Highlight_file () function highlights the file syntax.
The Get_browser () function of the PHP5 function returns the performance of the user's browser.
The exit () function prints a message and exits the current script.
The eval () function calculates the string according to the PHP code.
The Die () function prints a message and exits the current script.
The defined () function checks whether a constant exists.
The Define () function defines a constant.
The constant () function returns the value of a constant.
PHP5 the Connection_status () function of a common function returns the current connection state.
The connection_aborted () function checks to see if the client is disconnected.
The Zip_read () function reads the next file in the open zip file.
The Zip_open () function opens a ZIP file for reading.
The Zip_entry_read () function gets the content from the Open zip archive project.
The Zip_entry_open () function opens a ZIP archive project for reading.
PHP5 the Zip_entry_name () function of a common function returns the name of the ZIP archive project.
The Zip_entry_filesize () function returns the original size of the ZIP archive project (before compression).
The Zip_entry_compressionmethod () function returns the compression method for the ZIP archive project.
The Zip_entry_compressedsize () function returns the compressed file size of the ZIP archive item.
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 provides a function that is called when an unresolved entity name (NDATA) declaration is encountered.
The Xml_set_processing_instruction_handler () function provides a function that is called when the parser finds a processing instruction in an XML document.
The Xml_set_object () function allows XML parsers to be used in objects.
The Xml_set_notation_decl_handler () function of the PHP5 common function prescribes the function that is called when the parser finds a symbolic declaration in an XML document.
The Xml_set_external_entity_ref_handler () function provides a function that is called when the parser finds an external entity in an XML document.
The Xml_set_element_handler () function establishes the start and end element processors.
The Xml_set_default_handler () function establishes the default data processor for the XML parser.
The Xml_set_character_data_handler () function establishes the character data processor.
The Xml_parser_set_option () function sets options for the XML parser.
The Xml_parser_get_option () function Gets the option settings information from the XML parser.
The Xml_parser_free () function frees the XML parser.
PHP5 the Xml_parser_create () function of a common function to create an XML parser.
The Xml_parser_create_ns () function creates an XML parser with namespace support.
The Xml_parse_into_struct () function parses the XML data into an array.
The Xml_parse () function parses an XML document.
The Xml_get_error_code () function gets the XML parser error code.
The Xml_get_current_line_number () function gets the current line number of the XML parser.
The Xml_get_current_column_number () function Gets the current column number of the XML parser.
PHP5 the Xml_get_current_byte_index () function of a common function 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 as UTF-8.
The Utf8_decode () function decodes the UTF-8 string into iso-8859-1.
The WordWrap () function handles the string in a specified length.
The vsprintf () function writes the formatted string to a variable.
The vprintf () function outputs a formatted string.
The vfprintf () function writes the formatted string to the specified output stream.
The Ucwords () function of the PHP5 common function converts the first character of each word in a string to uppercase.
The Ucfirst () function converts the first character in a string to uppercase.
The trim () function deletes white space characters and other predefined characters from both ends of the string.
The Substr_replace () function replaces part of a string with another string.
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 a specific character in a string.
The Strtoupper () function converts a string to uppercase.
The Strtolower () function converts a string to lowercase.
The Strtok () function of the PHP5 common function splits the string into smaller strings.
The Strstr () function searches for a string that appears for the first time in another string.
The STRSPN () function returns the number of specific characters contained in the string.
The Strrpos () function finds the last occurrence of a string in another string.
The Strripos () function finds the last occurrence of a string in another string.
The Strrev () function reverses the 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 where the string first appears in another string.
PHP5 the STRPBRK () function of a common function searches 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 finds 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 that was added by the addslashes () function.
The Stripcslashes () function deletes the backslash that was added by the addcslashes () function.
The Strip_tags () function strips HTML, XML, and PHP tags.
The STRCSPN () function returns the number of characters found in the string before any of the specified characters are located.
PHP5 the Strcoll () function of a common function compares two strings.
The strcmp () function compares two strings.
The STRCHR () function searches for a string that appears for the first time in another string.
The strcasecmp () function compares two strings.
The Str_word_count () function evaluates the number of words in a string.
The Str_split () function splits the string into an array.
The Str_shuffle () function randomly disrupts all characters in a string.
The str_rot13 () function performs ROT13 encoding on the string.
The Str_replace () function replaces some other characters in a string with a string.
The Str_repeat () function repeats the string to a specified number of times.
The Str_pad () function fills the string to the specified length.
The Str_ireplace () function replaces some other characters in a string with a string.
PHP5 the sscanf () function of a common function parses input from a string according to the format specified.
The sprintf () function writes the formatted string to a variable.
The SOUNDEX () function evaluates the Soundex key of the string.
The Similar_text () function calculates the number of matching characters for two strings.
The Sha1_file () function computes the SHA-1 hash of the file.
The SHA1 () function computes the SHA-1 hash of the string.
The setlocale () function sets the region information (geographic information).
RTrim () P RTrim () function of PHP5 common 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.