Easy Tutorial
❮ Func Filesystem Move Uploaded File Php Pcre ❯

PHP var_dump() Function

PHP Available Functions

The var_dump() function is used to output information about a variable.

The var_dump() function displays structured information about one or more expressions, including their type and value. Arrays are recursively expanded, with indentation showing their structure.

PHP Version Requirements: PHP 4, PHP 5, PHP 7

Syntax

void var_dump ( mixed $expression [, mixed $... ] )

Parameter Description:

Return Value

No return value.

Example

<?php
$a = array(1, 2, array("a", "b", "c"));
var_dump($a);
?>

Output:

array(3) {
  [0]=>
  int(1)
  [1]=>
  int(2)
  [2]=>
  array(3) {
    [0]=>
    string(1) "a"
    [1]=>
    string(1) "b"
    [2]=>
    string(1) "c"
  }
}

Example

<?php
$b = 3.1;
$c = true;
var_dump($b, $c);
?>

Output:

float(3.1)
bool(true)

PHP Available Functions

❮ Func Filesystem Move Uploaded File Php Pcre ❯