Description of a variable  : var_dump

function var_dump

  • displays:   information about a variable
    • structured information a variable that includes its type and value.
  • How to use:

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

Tip from http:// php.net  : As with anything that outputs its result directly to the browser, you can use the output-control functions to capture the output of this function, and save it in a string (for example).

 

Try-Outs

code

<?php
echo "Using 'var_dump($data)'<br/>";
echo "Using 'array_string'<br/>";
echo "<br/>-------<br/>";
$a = array(1, 2,'<br/>', array("a", "b",'<br/>', "c"));
var_dump('<br/>',$a,'<br/>');
?>
<?php echo "<br/>-------<br/>";

echo "Uinsg 'double/float data types'<br/>";
$b = 3.12;
$c = true;
var_dump("<br/>",$b,"<br/>", $c);

?>

Runtime Views