Functions available in PHP


PHP available functions

PHP provides many available standard functions. The following table lists some commonly used ones:

Get the type of variableImport GET/POST/Cookie variables into the global scopeDetect whether the variable is an arrayDetect whether the variable is BooleanCheck whether the parameter is a legal callable structureis_float’s aliasDetect whether the variable is a floating point typeCheck whether the variable is an integeralias of is_intDetect whether the content of the variable is an iterable valuealias of is_intDetect whether the variable is NULLDetect whether the variable is a number or a numeric stringPrint the relevant information of the variableOutput or return a variable, expressed in string form
Function Description
boolval

Get the Boolean value of the variable

debug_zval_dump

View the reference count and type information of a variable in the zend engine

doubleval

Alias ​​for floatval

empty

Check a variable Whether it is empty

floatval

Get the floating point value of the variable

get_defined_vars

Returns an array composed of all defined variables

get_resource_type

Return resource type
##gettype


import_request_variables


intval


Get the integer value of the variable
##is_array


is_bool


is_callable


is_double


is_float


is_int


is_integer


is_iterable


is_long


is_null


is_numeric


is_object


Detect whether the variable is an object

is_real

is_float’s alias

is_resource

Detect whether the variable is a resource type

is_scalar

Detect whether the variable is a scalar

is_string

Detect whether the variable is a string

isset

Detect whether the variable has been set and is not NULL

print_r

Print variables and output easy-to-read information.

serialize

Serialize object

settype

Set the type of variable

strval

Get the string value of the variable

unserialize

Create a PHP value from a stored representation

unset

Release the given variable
##var_dump


var_export


Password hashing algorithm

Function Descriptionpassword_get_info password_hash password_needs_rehash password_verify
Returns information related to the specified hash (hash)

Create a password Hash


Check whether the hash value matches the specified option


Verify whether the password matches the hash value