PHP Manual

PHP function var_dump()

2019-09-11T08:04:03.000Z

Obsah článku

Availability in PHP 4.0

Prints variable information directly to the output (page).

Parameters

Parameter Data type Default value Note
$expression mixed not Variable to be output
$_ mixed null

Return values

void

The function returns nothing. It renders the output directly to the page like echo.

var_dump('I like PHP'); // string(13) "I like PHP"

Example of a more complex structure:

var_dump([1, 2, 3]);

Returns the following:

array(3) {
[0]=>
int(1)
[1]=>
int(2)
[2]=>
int(3)
}

Other resources

Official var-dump documentation

Jan Barášek   Více o autorovi

Autor článku pracuje jako seniorní vývojář a software architekt v Praze. Navrhuje a spravuje velké webové aplikace, které znáte a používáte. Od roku 2009 nabral bohaté zkušenosti, které tímto webem předává dál.

Rád vám pomůžu:

Související články

1.
195.

V jiných jazycích

Status:
All systems normal.
2025