Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP var_dump() Function

PHP var_dump() Function

PHP Available FunctionsAvailable PHP Functions

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:

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)

PHP Available FunctionsAvailable PHP Functions