English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
PHP provides many useful standard functions. The following table lists several commonly used ones:
Function | Description |
---|---|
boolval | Get the boolean value of a variable |
debug_zval_dump | View a variable's reference count and type information in the Zend engine |
doubleval | Alias of floatval |
empty | Check whether a variable is empty |
floatval | Get the floating-point value of the variable |
get_defined_vars | Return an array composed of all defined variables |
get_resource_type | Return the resource (resource) type |
gettype | Get the type of the variable |
import_request_variables | Import GET/POST/Cookie variables into the global scope |
intval | Get the integer value of the variable |
is_array | Check whether the variable is an array |
is_bool | Check whether the variable is a boolean type |
is_callable | Check whether the parameter is a valid callable structure |
is_double | Alias of is_float |
is_float | Check whether the variable is a floating-point type |
is_int | Check whether the variable is an integer |
is_integer | Alias of is_int |
is_iterable | Check whether the content of the variable is an iterable value |
is_long | Alias of is_int |
is_null | Check whether the variable is NULL |
is_numeric | Check whether the variable is a number or a numeric string |
is_object | Check whether the variable is an object |
is_real | Alias of is_float |
is_resource | Check whether the variable is a resource type |
is_scalar | Check whether the variable is a scalar |
is_string | Check whether the variable is a string |
isset | Check whether the variable is set and not NULL |
print_r | Print the variable, output information that is easy to read. |
serialize | Serialize the object |
settype | Set the type of the variable |
strval | Get the string value of the variable |
unserialize | Create PHP's value from the stored representation |
unset | Free the given variable |
var_dump | Print the relevant information of the variable |
var_export | Output or return a variable in string format |
Function | Description |
---|---|
password_get_info | Return information related to the specified hash (hash) |
password_hash | Create a hash (hash) of the password |
password_needs_rehash | Check whether the hash value matches the specified option |
password_verify | Verify whether the password matches the hash value |