Gen. partnerAlgotech

PHP function var_dump()

Prints variable information directly to the output (page).

|
September 11, 2019

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

Loading comments...

Stay in the loop

Subscribe to our newsletter and get the latest cybersecurity news delivered straight to your inbox.

Your data is safe. You can unsubscribe from the newsletter at any time.