PHP Common functions

Source: Internet
Author: User
Array functions
Array_chunk//Splitting an array into multiple arrays
Array_key_exists//Check whether the given key name or index exists in the array
Array_keys//Returns all the key names in the array and forms a new array
Array_merge//merge one or more arrays to rebuild the index
Array_values//Returns all values in the array, forming a new Array (numeric index)
Array//Create a new array
Arsort//reverse-order arrays and maintain index relationships
Asort//sorting arrays and maintaining index relationships
Count//counts the number of cells in an array or the number of attributes in an object
Each//returns the current key/value in the array and moves the array pointer one step forward
End//To point the inner pointer of the array to the last cell
Extract//Import a variable from an array into the current symbol table (whose key name is the name of the variable, and the key value as the value of the variable)
In_array//Check if a value exists in the array
Key//Get the keys from the associative array
Krsort//array reverse order by key name
Ksort//array sorted by key name
List//Assign the values in the array to some variables,
Next//Move the inner pointer in the array forward one
Current//Returns an array of cells
Reset//To point the inner pointer of the array to the first cell
Sort//Array sorting---sort_regular-normal comparison unit (does not change type), Sort_numeric-unit is compared as a number, the unit is compared as a string, and the cell is compared as a string based on the current locale setting.
Number of time and date lines


Date
Gmdate
Gmmktime
Microtime
Time

File system functions
BaseName
chmod
Copy
Delete/unlink
DirName
Fopen/flock/fread/fwrite/fclose
File_exists
File_get_contents
File_put_contents
File
Fileatime
Filemtime
FileSize
Ftruncate
Is_dir
Is_file
Is_readable
Is_uploaded_file
Is_writable
Mkdir
Move_uploaded_file
Rename
RmDir
Touch
Unlink

Mathematical functions
Abs
Ceil
Floor
Max
Min


MySQL function
Mysql_connect/mysql_pconnect
Mysql_error
Mysql_errno
Mysql_fetch_array
Mysql_fetch_field
Mysql_fetch_row
mysql_insert_id
Mysql_query

String handling functions
Addslashes
Echo
Explode
Join
Md5
Print
sprintf
Str_replace
Strstr
Strip_tags
Stripslashes
Strlen
Strpos
Strtolower
Strtouper
Substr
Trim

URL function library
Base64_decode
Base64_encode
Rawurldecode
Rawurlencode
UrlDecode
UrlEncode

Variable function
Empty
Floatval
Get_defined_vars
GetType
Intval
Is_array
Is_bool
Is_float
Is_int
Is_null
Is_numeric
Is_object
Is_resource
Is_string
Isset
Print_r
Settype
Strval
unset
Var_dump

Ini
Short_open_tag on
Asp_tags off
Disable_functions
Display_errors on
Track_errors on
Register_globals off
Post_max_size
Extension_dir = "./ext"
ENABLE_DL off

Extension=php_gd2.dll
Extension=php_mbstring.dll
Extension=php_mysql.dll
  • 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.