English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

PHP Basic Tutorial

PHP Advanced Tutorial

PHP & MySQL

PHP Reference Manual

PHP Function Usage and Examples

PHP provides many useful standard functions. The following table lists several commonly used ones:

FunctionDescription
boolvalGet the boolean value of a variable
debug_zval_dumpView a variable's reference count and type information in the Zend engine
doublevalAlias of floatval
emptyCheck whether a variable is empty
floatvalGet the floating-point value of the variable
get_defined_varsReturn an array composed of all defined variables
get_resource_typeReturn the resource (resource) type
gettypeGet the type of the variable
import_request_variablesImport GET/POST/Cookie variables into the global scope
intvalGet the integer value of the variable
is_arrayCheck whether the variable is an array
is_boolCheck whether the variable is a boolean type
is_callableCheck whether the parameter is a valid callable structure
is_doubleAlias of is_float
is_floatCheck whether the variable is a floating-point type
is_intCheck whether the variable is an integer
is_integerAlias of is_int
is_iterableCheck whether the content of the variable is an iterable value
is_longAlias of is_int
is_nullCheck whether the variable is NULL
is_numericCheck whether the variable is a number or a numeric string
is_objectCheck whether the variable is an object
is_realAlias of is_float
is_resourceCheck whether the variable is a resource type
is_scalarCheck whether the variable is a scalar
is_stringCheck whether the variable is a string
issetCheck whether the variable is set and not NULL
print_rPrint the variable, output information that is easy to read.
serializeSerialize the object
settypeSet the type of the variable
strvalGet the string value of the variable
unserializeCreate PHP's value from the stored representation
unsetFree the given variable
var_dumpPrint the relevant information of the variable
var_exportOutput or return a variable in string format

Password hashing algorithm

FunctionDescription
password_get_infoReturn information related to the specified hash (hash)
password_hashCreate a hash (hash) of the password
password_needs_rehashCheck whether the hash value matches the specified option
password_verifyVerify whether the password matches the hash value