PHP var_dump() Function
var_dump() The function is used to output information about a variable.
var_dump() The function displays structural information about one or more expressions, including the type and value of the expression. Arrays are expanded recursively, showing their structure through indentation.
PHP version requirement: PHP 4, PHP 5, PHP 7
Syntax
void var_dump ( mixed $expression [, mixed $... ] )
Parameter Description:
- $expression: the variable you want to output.
Return Value
No value is returned.
Example
Example
The output is:
array(3) {
[0]=>
int(1)
[1]=>
int(2)
[2]=>
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
}
Example
The output is:
float(3.1)
bool(true)
Available PHP Functions