how to use var_dump in php code example

Example 1: var_dump smarty

{$var|@var_dump}

Example 2: php var dump die

$variable = "hello";

var_dump($variable);
die();

Example 3: var_dump php

dumping objects that reference each other could lead to infinite recursion
<?php 
$brother = new Sibling();
$sister = new Sibling();
$brother->sister = $sister;
$sister->brother = $brother;

var_dump($brother); 
/* dumps all of $brother's properties, including "sister", which dumps all of $sister's properties, including "brother", etc. */
?>

Example 4: php dump

$variable = "Hello";

var_dump($variable);

Example 5: php dump to page

$variable = "Hello";

var_dump($variable);

Tags:

Php Example