PHP provides many standard functions available, the following table lists some of the commonly used ones:
function | describe |
---|
boolval | Get the boolean value of a variable |
debug_zval_dump | Check the reference count and type information of a variable in the zend engine |
doubleval | alias for floatval |
empty | Check if a variable is empty |
floatval | Get the floating point value of a variable |
get_defined_vars | Returns an array consisting of all defined variables |
get_resource_type | Return resource type |
gettype | Get the type of variable |
import_request_variables | Import GET/POST/Cookie variables into the global scope |
intval | Get the integer value of a variable |
is_array | Check if a variable is an array |
is_bool | Check if a variable is of type Boolean |
is_callable | Check whether the parameter is a legal callable structure |
is_double | Alias for is_float |
is_float | Check whether the variable is of floating point type |
is_int | Check if a variable is an integer |
is_integer | Alias for is_int |
is_iterable | Check whether the content of a variable is an iterable value |
is_long | Alias for is_int |
is_null | Check if a variable is NULL |
is_numeric | Check if a variable is a number or a string of numbers |
is_object | Check if a variable is an object |
is_real | Alias for is_float |
is_resource | Check whether the variable is a resource type |
is_scalar | Check if a variable is a scalar |
is_string | Check if a variable is a string |
isset | Check if a variable is set and non-NULL |
print_r | Print variables to output easy-to-read information. |
serialize | serialized object |
settype | Set the type of variable |
strval | Get the string value of a variable |
unserialize | Create a PHP value from a stored representation |
unset | Release the given variable |
var_dump | Print information about variables |
var_export | Output or return a variable, represented as a string |
Password hashing algorithm
function | describe |
---|
password_get_info | Returns information about the specified hash |
password_hash | Create a hash of the password |
password_needs_rehash | Checks whether a hash value matches the specified options |
password_verify | Verify that the password matches the hash value |