Overview of the list of commonly used functions in PHP5_PHP Tutorial

WBOY
Release: 2016-07-15 13:35:18
Original
972 people have browsed it

usleep() function delays code execution for a number of microseconds.

unpack() function unpacks data from a binary string.

The uniqid() function generates a unique ID based on the current time in microseconds.

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.

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.

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.

exit() function outputs a message and exits the current script.

eval() function evaluates string according to PHP code.

die() function outputs a message and exits the current script.

defined() function checks whether a constant exists.

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.

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 an open 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.

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 using XML parsers with 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 that is called when the parser finds an external entity in the XML document.

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.

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.

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.

xml_error_string() function gets the error description of the XML parser.

utf8_encode() function encodes ISO-8859-1 string to UTF-8.

utf8_decode() function decodes UTF-8 string to ISO-8859-1.

The wordwrap() function wraps the string according to the specified length.

The vsprintf() function writes the formatted string into a variable.

vprintf() function outputs a formatted string.

The vfprintf() function writes a 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 a string to uppercase.

trim() function removes whitespace characters and other predefined characters from both ends of a string.

substr_replace() function replaces part of a string with another string.

substr_count() function counts the number of times a substring appears in a string.

substr_compare() function compares two strings starting from the specified length.

substr() function returns a part of a string.

strtr() function converts specific characters in a string.

strtoupper() function converts a string to uppercase.

strtolower() function converts a string to lowercase.

The strtok() function, a commonly used function in PHP5, splits a string into smaller strings.

strstr() function searches for the first occurrence of a string within another string.

strspn() function returns the number of specific characters contained in a string.

strrpos() function finds the last occurrence of a string within another string.

strripos() function finds the last occurrence of a string within another string.

strrev() function reverses a string.

strrchr() function finds the last occurrence of a string within another string and returns all characters from that position to the end of the string.

strpos() function returns the position of the first occurrence of a string within another string.

Strpbrk() function, a commonly used function in PHP5, searches for any one of the specified characters in a string.

strncmp() function compares two strings.

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.

stristr() function finds the first occurrence of a string within another string.

stripos() function returns the position of the first occurrence of a string within another string.

The stripslashes() function removes the backslashes added by the addslashes() function.

The stripcslashes() function removes backslashes added by the addcslashes() function.

strip_tags() function strips HTML, XML and PHP tags.

strcspn() function returns the number of characters searched in a string before any specified character is found.

Strcoll() function, a commonly used function in PHP5, compares two strings.

strcmp() function compares two strings.

strchr() function searches for the first occurrence of a string within 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.

str_shuffle() function randomly shuffles all characters in a string.

str_rot13() function performs ROT13 encoding on a string.

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 a string to the specified length.

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.

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 computes 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/445916.htmlTechArticleusleep() function delays code execution for several microseconds. The unpack() function unpacks data from a binary string. The uniqid() function generates a unique...
based on the current time in microseconds
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!