PHP String function Summary

Source: Internet
Author: User

The htmlentities () function of the PHP String function converts characters to HTML objects.

The html_entity_decode () function converts HTML objects into characters.

The hebrevc () function switches the flow from right to left to the flow from left to right. It also converts the new line (n) to <br/>.

The hebrev () function switches the flow from right to left to the flow from left to right.

The get_html_translation_table () function returns the translation table used by the htmlentities () and htmlspecialchars () functions.

The fprintf () function writes formatted strings to a specified output stream (for example, a file or database ).

The explode () function separates strings into arrays.

The echo () function of the PHP String function outputs one or more strings.

The crypt () function returns a string encrypted with DES, Blowfish, or MD5.

The crc32 () function computes the crc32 polynomial of a string.

The count_chars () function returns information about the characters used by the string.

The convert_uuencode () function uses the uuencode algorithm to encode the string.

The convert_uudecode () function of the PHP String function decodes uencode-encoded strings.

The convert_cyr_string () function converts a character from one Cyrillic to another.

The chunk_split () function Splits a string into a series of smaller parts.

The chr () function returns characters from the specified ASCII value.

The chop () function removes white spaces or other predefined characters from the end of a string.

The bin2hex () function converts ASCII character strings to hexadecimal values.

The addslashes () function of the PHP String function adds a backslash before the specified predefined character.

The addcslashes () function adds a backslash before the specified character.

The xpath () function runs the XPath query on the XML document.

The simplexml_load_string () function loads an XML string into an object.

The simplexml_load_file () function loads an XML document into an object.

The simplexml_import_dom () function of the PHP String function converts a DOM node to a SimpleXMLElement object.

The registerXPathNamespace () function creates a namespace context for the next XPath query.

The getNamespace () function obtains the namespace used in the XML document.

The getName () function obtains the name of an XML element from the SimpleXMLElement object.

The getDocNamespaces () function returns the namespace declared in the XML document from the SimpleXMLElement object.

The children () function gets the child nodes of a specified node.

The attributes () function obtains the attributes of SimpleXML elements.

The asXML () function of the PHP String function returns the XML document from the SimpleXMLElement object in the form of a String.

The addChild () function adds a child node to the specified XML node.

The addAttribute () function adds an attribute to the SimpleXML element.

The _ construct () function creates a new SimpleXMLElement object.

The mysql_unbuffered_query () function sends an SQL query (not obtaining/caching results) to MySQL ).

The mysql_thread_id () function returns the ID of the current thread.

The mysql_stat () function returns the current system status of the MySQL server.

The mysql_select_db () function sets the active MySQL database.

The mysql_result () function of the PHP String function returns the value of a field in the result set.

The mysql_real_escape_string () function escapes special characters in strings used in SQL statements.

The mysql_query () function executes a MySQL query.

The mysql_ping () function is used to Ping a server connection. If there is no connection, the connection is reconnected.

The mysql_pconnect () function opens a persistent connection to the MySQL server.

The number of rows in the returned result set by the mysql_num_rows () function.

The number of fields in the returned result set by the mysql_num_fields () function.

The mysql_list_processes () function lists MySQL processes.

The mysql_list_dbs () function of the PHP String function lists all databases on the MySQL server.

The mysql_insert_id () function returns the ID generated by the previous INSERT operation.

The mysql_info () function returns the information of the last query.

The mysql_get_server_info () function returns information about the MySQL server.

The mysql_get_proto_info () function returns information about the MySQL protocol.

The mysql_get_host_info () function returns information about the MySQL host.

The mysql_get_client_info () function of the PHP String function returns the MySQL client information.

The mysql_free_result () function releases the result memory.

The type of the specified field in the returned result set of the mysql_field_type () function.

The mysql_field_table () function returns the name of the table where the specified field is located.

The mysql_field_seek () function sets the pointer in the result set to the specified field offset.

The field name of the specified field in the result obtained by the mysql_field_name () function.

The mysql_field_len () function returns the length of the specified field.

The mysql_field_flags () function of the PHP String function obtains the identifier associated with the specified field from the result.

The mysql_fetch_row () function retrieves a row from the result set as a numeric array.

The mysql_fetch_object () function retrieves a row from the result set (record set) as an object.

The mysql_fetch_lengths () function gets the length of each field in a row.

The mysql_fetch_field () function retrieves column information from the result set and returns it as an object.

The mysql_fetch_assoc () function retrieves a row from the result set as an associated array.

The mysql_fetch_array () function of the PHP String function retrieves a row from the result set as an associated array or number array, or both.

The mysql_error () function returns the text error message generated by the previous MySQL operation.

The mysql_errno () function returns the numeric encoding of the error message in the previous MySQL operation.

The mysql_db_name () function gets the name of the database returned by the mysql_list_dbs () call.

The mysql_data_seek () function moves the internal result pointer.

The mysql_connect () function opens a non-persistent MySQL connection.

The mysql_close () function closes non-persistent MySQL connections.

The mysql_client_encoding () function returns the name of the currently connected character set.

The mysql_affected_rows () function of the PHP String function returns the number of rows affected by the previous MySQL operation.

The tanh () function returns the hyperbolic tangent.

The return tangent of the tan () function.

The srand () function broadcasts the random number generator seeds.

The sqrt () function returns the square root of a number.

The sinh () function of the PHP String function returns the hyperbolic sine of a number.

The sin () function returns the sine of a number.

The round () function rounds a floating point number.

The rand () function returns a random integer.

The rad2deg () function converts radians to degrees.

The pow () function of the PHP String function returns the yth power of x.

The pi () function returns the value of the circumference rate.

The DEC Dec () function converts octal to decimal.

Mt_srand () Seeding Mersenne Twister random number generator.

Mt_rand () returns a random integer using the Mersenne Twister algorithm.

Mt_getrandmax () shows the maximum possible value of a random number.

Min () returns the minimum value.

Max () returns the maximum value.

The log1p () of the PHP String function returns log (1 + x). Even if the value of x is close to zero, the exact result can be calculated.

The base-10 logarithm of log10.

Log () returns the natural logarithm.

Lcg_value () is a linear cooperator.

Is_nan () determines whether it is a valid value.

Is_infinite () determines whether it is an infinite value.

The is_finite () function determines whether the value is finite.

Hypot () function is used to calculate the length of the Oblique Edge of the angular triangle.

The hexdec () function of the PHP String function converts hexadecimal to decimal.

The fmod () function displays the maximum possible values of a random number.

The fmod () function returns the remainder of the Floating Point Number of the Division.

The floor () function rounds down to the nearest integer.

The expm1 () function returns exp (x)-1, and even if the number value is close to zero, the exact result can be calculated.

Exp () function calculates the e index.

The deg 2rad () function of the PHP String function converts degrees to radians.

The decoct () function converts decimal to octal.

The dechex () function converts decimal to hexadecimal.

The decbin () function converts decimal to binary.

The cosh () function returns the hyperbolic cosine of a number.

The cos () function returns the cosine of a number.

The ceil () function rounds up to the nearest integer.

The bindec () function converts binary to decimal.

The base_convert () function converts numbers in any hexadecimal format.

The atanh () function returns the inverse hyperbolic tangent of an angle.

PHP String functions: atan (), atan2 (), and atan2 ()


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.