← All built-ins / var_dump()

var_dump()

var_dump(...$args): void

Parameters

NameTypeDescription
$vmixedvalue to dump (one per call)

Return value

Prints type and value, recursively for arrays; returns nothing. The main debugging tool.

Example

var_dump([1, "a" => true]);
var_dump(42);
var_dump("hi");
array(2) {
  [0] => int(1)
  ["a"] => bool(true)
}
int(42)
string(2) "hi"

See also

print_r()var_export()gettype()