Home > Backend Development > PHP Tutorial > PHP function library (overview), php function library overview_PHP tutorial

PHP function library (overview), php function library overview_PHP tutorial

WBOY
Release: 2016-07-13 09:45:02
Original
769 people have browsed it

PHP function library (overview), PHP function library overview

Array function:
  • array_change_key_case — Returns an array whose string keys are all lowercase or uppercase
  • array_chunk — Split an array into multiple
  • array_column — Returns a specified column in the array
  • array_combine — Create an array with the value of one array as its key and the value of the other array as its value
  • array_count_values ​​— counts the number of occurrences of all values ​​in the array
  • array_diff_assoc — Computes the difference of an array with index checking
  • array_diff_key — Computes the difference of an array using key name comparison
  • array_diff_uassoc — Calculate the difference of an array using a user-provided callback function to do index checking
  • array_diff_ukey — Use the callback function to compare the key names to calculate the difference set of the array
  • array_diff — Calculate the difference of arrays
  • array_fill_keys — Fills an array
  • with specified keys and values
  • array_fill — fills an array
  • with the given value
  • array_filter — Use callback function to filter the cells in the array
  • array_flip — swap keys and values ​​in an array
  • array_intersect_assoc — Compute the intersection of arrays with index checking
  • array_intersect_key — Computes the intersection of arrays using key name comparison
  • array_intersect_uassoc — Calculate the intersection of arrays with index checking, use callback function to compare indexes
  • array_intersect_ukey — Use callback function to compare key names to calculate the intersection of arrays
  • array_intersect — Calculate the intersection of arrays
  • array_key_exists — Checks whether a given key or index exists in an array
  • array_keys — Returns some or all key names in the array
  • array_map — Apply the callback function to the cells of the given array
  • array_merge_recursive — Merge one or more arrays recursively
  • array_merge — merge one or more arrays
  • array_multisort — Sort multiple arrays or multidimensional arrays
  • array_pad — pad the array to the specified length with values
  • array_pop — pop the last element of the array
  • array_product — Calculates the product of all values ​​in an array
  • array_push — push one or more elements to the end of the array (push)
  • array_rand — Randomly remove one or more cells from the array
  • array_reduce — Iteratively reduce an array to a single value using a callback function*
  • array_replace_recursive — Recursively replace the elements of the first array with the passed array*
  • array_replace — Replace the elements of the first array with the passed array *
  • array_reverse — Returns an array with the cells in reverse order
  • array_search — Search for a given value in an array, and return the corresponding key name if successful
  • array_shift — Move the element at the beginning of the array out of the array *
  • array_slice — Remove a segment from the array
  • array_splice — remove part of an array and replace it with other values ​​*
  • array_sum — Calculates the sum of all values ​​in an array
  • array_udiff_assoc — Calculate the difference set of arrays with index checking, use callback function to compare data
  • array_udiff_uassoc — Calculate the difference set of the array with index check, use callback function to compare the data and index
  • array_udiff — Use callback function to compare data to calculate the difference of arrays
  • array_uintersect_assoc — Calculate the intersection of arrays with index checking, use callback function to compare data
  • array_uintersect_uassoc — Calculate the intersection of arrays with index checking, use callback function to compare data and index
  • array_uintersect — Calculate the intersection of arrays and use callback functions to compare data
  • array_unique — Remove duplicate values ​​from an array
  • array_unshift — Insert one or more cells at the beginning of the array
  • array_values ​​— Returns all values ​​in the array
  • array_walk_recursive — Recursively apply user functions *
  • to each member of an array
  • array_walk — Use user-defined functions to perform callback processing on each element in the array *
  • array — Create a new array
  • arsort — sort an array in reverse order and maintain index relationships *
  • asort — Sort an array and maintain index relationship
  • compact — Create an array including variable names and their values ​​*
  • count — Count the number of cells in an array or the number of attributes in an object
  • current — Returns the current cell in the array
  • each — Returns the current key/value pair in the array and moves the array pointer forward one step *
  • end — Point the internal pointer of the array to the last element
  • extract — Import variables from the array into the current symbol table *
  • in_array — Check whether a value exists in the array
  • key_exists — alias array_key_exists
  • key — Get the key name from the associative array
  • krsort — Sort the array in reverse order by key name
  • ksort — Sort array by key name
  • list — Assign the values ​​in the array to some variables *
  • natcasesort — Sort an array case-insensitively using the "natural sorting" algorithm
  • natsort — Sort an array using the "natural sorting" algorithm *
  • next — Move the internal pointer in the array forward one position
  • pos — alias for current
  • prev — Rewind the internal pointer of the array one bit *
  • range — Create an array containing cells in the specified range
  • reset — Point the internal pointer of the array to the first element *
  • rsort — Sort the array in reverse order
  • shuffle — shuffle the array
  • sizeof — alias for count
  • sort — Sort an array
  • uasort — Sort values ​​in an array using a user-defined comparison function and keep index associations *
  • uksort — Sort keys in an array using a user-defined comparison function
  • usort — Sort values ​​in an array using a user-defined comparison function
-------------------------------------------------- -------------------------------------------------- ------------------------------------ -------------------------------------------------- -------------------------------------------------- ------------------------------------ String functions:
  • addcslashes — Escape characters in a string using backslashes in C style
  • addslashes — Use backslashes to quote strings *
  • bin2hex — Function converts a string of ASCII characters into a hexadecimal value
  • chop — alias for rtrim
  • chr — Returns the specified character *
  • chunk_split — Split a string into small chunks
  • convert_cyr_string — Convert characters from one Cyrillic character to another
  • convert_uudecode — Decode a uuencode-encoded string
  • convert_uuencode — Use uuencode to encode a string
  • count_chars — Returns information about the characters used in the string
  • crc32 — Calculates the crc32 polynomial of a string *
  • crypt — One-way string hash *
  • echo — Output one or more strings
  • explode — Use one string to split another string *
  • fprintf — Write the formatted string to the stream
  • get_html_translation_table — Returns the translation table using htmlspecialchars and htmlentities *
  • hebrev — Convert logical-Hebrew to visual-Hebrew
  • hebrevc — Convert logical-Hebrew to visual-Hebrew and convert newlines
  • hex2bin — Convert hexadecimal string to binary string
  • html_entity_decode — Convert all HTML entities to their applicable characters
  • htmlentities — Convert all applicable characters to HTML entities
  • htmlspecialchars_decode — Convert special HTML entities back to normal characters *
  • htmlspecialchars — Convert special characters to HTML entities
  • implode — Convert the value of a one-dimensional array into a string *
  • join — alias implode
  • lcfirst — Make the first character of a string lowercase
  • levenshtein — Calculate the edit distance between two strings *
  • localeconv — Get numeric formatting information
  • ltrim — remove whitespace characters (or other characters) at the beginning of a string
  • md5_file — Calculate the MD5 hash value of the specified file
  • md5 — Calculate the MD5 hash value of a string *
  • metaphone — Calculate the metaphone key of a string
  • money_format — Formats a number as a currency string
  • nl_langinfo — Query language and locale information
  • nl2br — Insert an HTML newline mark before all new lines in the string *
  • number_format — Format a number with thousand separators *
  • ord — Returns the ASCII code value of the character *
  • parse_str — Parse a string into multiple variables
  • print — output string
  • printf — Output formatted string
  • quoted_printable_decode — Convert quoted-printable string to 8-bit string
  • quoted_printable_encode — Convert 8-bit string to quoted-printable string
  • quotemeta — escape metacharacter set *
  • rtrim — removes whitespace characters (or other characters) at the end of a string
  • setlocale — Set region information
  • sha1_file — Calculate the sha1 hash value of a file
  • sha1 — Calculates the sha1 hash value of a string
  • similar_text — Calculate the similarity of two strings *
  • soundex — Calculate the soundex key of a string
  • sprintf — Return a formatted string
  • sscanf — Parse input characters according to the specified format
  • str_getcsv — Parse a CSV string into an array
  • str_ireplace — case-ignoring version of str_replace
  • str_pad — pad a string with another string to the specified length *
  • str_repeat — Repeat a string
  • str_replace — Substring replacement
  • str_rot13 — performs a ROT13 conversion on a string
  • str_shuffle — Randomly shuffle a string
  • str_split — Convert a string to an array *
  • str_word_count — Returns the usage of words in the string
  • strcasecmp — Binary safe comparison of strings (case insensitive)
  • strchr — alias strstr
  • strcmp — Binary safe string comparison *
  • strcoll — Locale-based string comparison *
  • strcspn — Get the length of the starting substring of the unmatched mask *
  • strip_tags — Strip HTML and PHP tags from strings *
  • stripcslashes — dequote a string escaped using addcslashes
  • stripos — Find the first occurrence of a string (case-insensitive)
  • stripslashes — backquote a quoted string
  • stristr — A case-ignoring version of the strstr function
  • strlen — Get the string length
  • strnatcasecmp — Compare strings using the "natural order" algorithm (case-insensitive)
  • strnatcmp — Compare strings using natural ordering algorithm
  • strncasecmp — Binary safe comparison of several characters at the beginning of a string (case-insensitive)
  • strncmp — Binary safe comparison of several characters at the beginning of a string *
  • strpbrk — Find any character in a string *
  • strpos — Find the first occurrence of a string *
  • strrchr — Find the last occurrence of a specified character in a string *
  • strrev — Reverse a string *
  • strripos — Calculate the position of the last occurrence of the specified string in the target string (case-insensitive)
  • strrpos — Calculate the position of the last occurrence of the specified string in the target string *
  • strspn — Calculate the length of the first substring in a string in which all characters exist in the specified character set*
  • strstr — Find the first occurrence of a string *
  • strtok — tag split string *
  • strtolower — Convert string to lowercase
  • strtoupper — Convert a string to uppercase
  • strtr — Convert the specified character *
  • substr_compare — Binary safe comparison of strings (specified length compared from offset position)
  • substr_count — Count the number of occurrences of a string
  • substr_replace — Replace a substring of a string
  • substr — Returns the substring of a string
  • trim — Remove blank characters (or other characters) at the beginning and end of the string
  • ucfirst — Convert the first letter of the string to uppercase
  • ucwords — Convert the first letter of each word in a string to uppercase *
  • vfprintf — Write formatted string to stream
  • vprintf — Output formatted string
  • vsprintf — Returns the formatted string
  • wordwrap — breaks a string into a specified number of words *
-------------------------------------------------- -------------------------------------------------- ------------------------------------ -------------------------------------------------- -------------------------------------------------- ------------------------------------ JSON function:
  • json_decode — Encode a string in JSON format
  • json_encode — JSON encode variables
  • json_last_error_msg — Returns the error string of the last json_encode() or json_decode() call
  • json_last_error — Returns the last error that occurred
-------------------------------------------------- -------------------------------------------------- ------------------------------------ -------------------------------------------------- -------------------------------------------------- ------------------------------------ URL function:
  • base64_decode — Decode data encoded using MIME base64
  • base64_encode — Encode data using MIME base64
  • get_headers — Get all headers sent by the server in response to an HTTP request
  • get_meta_tags — Extract all meta tag content attributes from a file and return an array
  • http_build_query — Generate the request string after URL-encoding
  • parse_url — Parse a URL and return its component parts
  • rawurldecode — Decode an encoded URL string
  • rawurlencode — Encode URLs according to RFC 1738
  • urldecode — Decode an encoded URL string
  • urlencode — Encode URL string
-------------------------------------------------- -------------------------------------------------- ------------------------------------ -------------------------------------------------- -------------------------------------------------- ------------------------------------ Session function:
  • session_abort — Discard session array changes and finish session
  • session_cache_expire — Returns the expiration time of the current cache
  • session_cache_limiter — Read/set cache limiter
  • session_commit — alias of session_write_close
  • session_decode — Decode session data
  • session_destroy — Destroy all data in a session
  • session_encode — Encode the current session data into a string
  • session_get_cookie_params — Get session cookie parameters
  • session_id — Get/set the current session ID
  • session_is_registered — Checks whether the variable is registered in the session
  • session_module_name — Get/set the session module name
  • session_name — Read/set session name
  • session_regenerate_id — Update an existing session ID with a newly generated session ID
  • session_register_shutdown — Close session
  • session_register — Register one or more global variables with the current session
  • session_reset — Re-initialize session array with original values
  • session_save_path — Read/set the save path of the current session
  • session_set_cookie_params — Set session cookie parameters
  • session_set_save_handler — Set user-defined session storage function
  • session_start — Start a new session or reuse an existing session
  • session_status — Returns the current session status
  • session_unregister — Unregister a global variable from the current session
  • session_unset — Free all session variables
  • session_write_close — Write session data and end session
-------------------------------------------------- -------------------------------------------------- ------------------------------------ -------------------------------------------------- -------------------------------------------------- ------------------------------------ Classes/Object function:
  • __autoload — Attempts to load undefined class
  • call_user_method_array — Call a user method, passing the parameter array (deprecated)
  • call_user_method — Call a user method on a specific object (deprecated)
  • class_alias — Create an alias for a class
  • class_exists — Check whether the class is defined
  • get_called_class — The name of the "Late Static Binding" class
  • get_class_methods — Returns an array consisting of class method names
  • get_class_vars — Returns an array consisting of the default attributes of the class
  • get_class — Returns the class name of the object
  • get_declared_classes — Returns an array consisting of the names of defined classes
  • get_declared_interfaces — Returns an array containing all declared interfaces
  • get_declared_traits — Returns an array of all defined traits
  • get_object_vars — Returns an associative array consisting of object properties
  • get_parent_class — Returns the parent class name of the object or class
  • interface_exists — Check whether the interface has been defined
  • is_a — Returns TRUE if the object belongs to this class or this class is the parent class of this object
  • is_subclass_of — Returns TRUE if this object is a subclass of this class
  • method_exists — Check whether a class method exists
  • property_exists — Check whether an object or class has this property
  • trait_exists — Check whether the specified trait exists
-------------------------------------------------- -------------------------------------------------- ------------------------------------ -------------------------------------------------- -------------------------------------------------- ------------------------------------ MySQL function:
  • mysql_affected_rows — Get the number of record rows affected by the previous MySQL operation
  • mysql_client_encoding — Returns the name of the character set
  • mysql_close — Close the MySQL connection
  • mysql_connect — Open a connection to the MySQL server
  • mysql_create_db — Create a new MySQL database
  • mysql_data_seek — Move pointer to internal result
  • mysql_db_name — Get result data
  • mysql_db_query — Send a MySQL query
  • mysql_drop_db — drop (delete) a MySQL database
  • mysql_errno — Returns the numeric code of the error message in the previous MySQL operation
  • mysql_error — Returns the text error message generated by the previous MySQL operation
  • mysql_escape_string — Escape a string for mysql_query
  • mysql_fetch_array — Fetch a row from the result set as an associative array, a numeric array, or both
  • mysql_fetch_assoc — Get a row from the result set as an associative array
  • mysql_fetch_field — Get column information from the result set and return it as an object
  • mysql_fetch_lengths — Get the length of each output in the result set
  • mysql_fetch_object — Get a row from the result set as an object
  • mysql_fetch_row — Get a row from the result set as an enumeration array
  • mysql_field_flags — Get the flags associated with the specified field from the result
  • mysql_field_len — Returns the length of the specified field
  • mysql_field_name — Get the field name of the specified field in the result
  • mysql_field_seek — Set the pointer in the result set to the specified field offset
  • mysql_field_table — Get the table name where the specified field is located
  • mysql_field_type — Get the type of the specified field in the result set
  • mysql_free_result — Release result memory
  • mysql_get_client_info — Get MySQL client information
  • mysql_get_host_info — Get MySQL host information
  • mysql_get_proto_info — Get MySQL protocol information
  • mysql_get_server_info — Get MySQL server information
  • mysql_info — Get the latest query information
  • mysql_insert_id — Get the ID generated by the previous INSERT operation
  • mysql_list_dbs — List all databases in the MySQL server
  • mysql_list_fields — List fields in MySQL results
  • mysql_list_processes — List MySQL processes
  • mysql_list_tables — List tables in the MySQL database
  • mysql_num_fields — Get the number of fields in the result set
  • mysql_num_rows — Get the number of rows in the result set
  • mysql_pconnect — Open a persistent connection to the MySQL server
  • mysql_ping — Ping a server connection, reconnect if there is no connection
  • mysql_query — Send a MySQL query
  • mysql_real_escape_string — Escape special characters in a string used in a SQL statement, taking into account the current character set of the connection
  • mysql_result — Get result data
  • mysql_select_db — Select MySQL database
  • mysql_set_charset — Set the client’s character set
  • mysql_stat — Get the current system status
  • mysql_tablename — Get the table name
  • mysql_thread_id — Returns the ID of the current thread
  • mysql_unbuffered_query — Sends a SQL query to MySQL without retrieving and caching the result rows
-------------------------------------------------- -------------------------------------------------- ------------------------------------ -------------------------------------------------- -------------------------------------------------- ------------------------------------ Math function:
  • abs — absolute value
  • acos — inverse cosine
  • acosh — inverse hyperbolic cosine
  • asin — arcsine
  • asinh — inverse hyperbolic sine
  • atan2 — Arctangent of two parameters
  • atan — Arctangent
  • atanh — inverse hyperbolic tangent
  • base_convert — Convert numbers between any bases
  • bindec — Convert binary to decimal
  • ceil — rounding to the nearest whole
  • cos — cosine
  • cosh — hyperbolic cosine
  • decbin — Convert decimal to binary
  • dechex — Convert decimal to hexadecimal
  • decoct — Convert decimal to octal
  • deg2rad — Convert angles to radians
  • exp — Calculate the exponent of e
  • expm1 — Returns exp(number) - 1, and can calculate accurate results even when the value of number is close to zero
  • floor — Rounding by rounding
  • fmod — Returns the floating point remainder of division
  • getrandmax — displays the maximum possible value of a random number
  • hexdec — Convert hexadecimal to decimal
  • hypot — Calculate the length of the hypotenuse of a right triangle
  • intdiv — Integer division
  • is_finite — Determine whether it is a finite value
  • is_infinite — Determine whether the value is infinite
  • is_nan — Determine whether it is a legal value
  • lcg_value — Combination Linear Congruential Generator
  • log10 — base 10 logarithm
  • log1p — returns log(1 number), and can calculate accurate results even when the value of number is close to zero
  • log — natural logarithm
  • max — Find the maximum value
  • min — Find the minimum value
  • mt_getrandmax — displays the maximum possible value of a random number
  • mt_rand — Generate better random numbers
  • mt_srand — Sowing the seeds for a better random number generator
  • octdec — Convert octal to decimal
  • pi — get the pi value
  • pow — exponential expression
  • rad2deg — Convert radians to corresponding degrees
  • rand — Generate a random integer
  • round — Round floating point numbers
  • sin — sine
  • sinh — hyperbolic sine
  • sqrt — square root
  • srand — Plant a random number generator seed
  • tan — tangent
  • tanh — hyperbolic tangent
-------------------------------------------------- -------------------------------------------------- ------------------------------------ -------------------------------------------------- -------------------------------------------------- ------------------------------------ Date/Time function:
  • checkdate — Verify a Gregorian date
  • date_add — alias DateTime::add
  • date_create_from_format — alias DateTime::createFromFormat
  • date_create_immutable_from_format — alias DateTimeImmutable::createFromFormat
  • date_create_immutable — alias DateTimeImmutable::__construct
  • date_create — alias DateTime::__construct
  • date_date_set — alias DateTime::setDate
  • date_default_timezone_get — Get the default time zone used by all date and time functions in a script
  • date_default_timezone_set — Set the default timezone used for all datetime functions in a script
  • date_diff — alias DateTime::diff
  • date_format — alias DateTime::format
  • date_get_last_errors — alias DateTime::getLastErrors
  • date_interval_create_from_date_string — alias DateInterval::createFromDateString
  • date_interval_format — alias DateInterval::format
  • date_isodate_set — alias DateTime::setISODate
  • date_modify — alias DateTime::modify
  • date_offset_get — alias DateTime::getOffset
  • date_parse_from_format — Get info about given date formatted according to the specified format
  • date_parse — Returns associative array with detailed info about given date
  • date_sub — alias DateTime::sub
  • date_sun_info — Returns an array with information about sunset/sunrise and twilight begin/end
  • date_sunrise — Returns the sunrise time for a given date and location
  • date_sunset — Returns the sunset time for a given date and location
  • date_time_set — alias DateTime::setTime
  • date_timestamp_get — alias DateTime::getTimestamp
  • date_timestamp_set — alias DateTime::setTimestamp
  • date_timezone_get — alias DateTime::getTimezone
  • date_timezone_set — alias DateTime::setTimezone
  • date — Format a local time/date
  • getdate — Get date/time information
  • gettimeofday — Get the current time
  • gmdate — Format a GMT/UTC date/time
  • gmmktime — Get UNIX timestamp of GMT date
  • gmstrftime — Format GMT/UTC time/date according to locale
  • idate — Format local time and date into integers
  • localtime — Get local time
  • microtime — Returns the current Unix timestamp and microseconds
  • mktime — Get the Unix timestamp of a date
  • strftime — Format local time/date according to locale
  • strptime — parse date/time generated by strftime
  • strtotime — Parse any English text datetime description into a Unix timestamp
  • time — Returns the current Unix timestamp
  • timezone_abbreviations_list — alias DateTimeZone::listAbbreviations
  • timezone_identifiers_list — alias DateTimeZone::listIdentifiers
  • timezone_location_get — alias DateTimeZone::getLocation
  • timezone_name_from_abbr — Returns the timezone name from abbreviation
  • timezone_name_get — alias DateTimeZone::getName
  • timezone_offset_get — alias DateTimeZone::getOffset
  • timezone_open — alias DateTimeZone::__construct
  • timezone_transitions_get — alias DateTimeZone::getTransitions
  • timezone_version_get — Gets the version of the timezonedb

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1044673.htmlTechArticlePHP function library (overview), php function library overview array function: array_change_key_case Returns the string key name in all lowercase or Uppercase array array_chunk splits an array into multiple a...
Related labels:
php
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