difference between var_dump and var_export
Var_dump
void var_dump ( mixed expression [, mixed expression [, …]])
This function returns structured information about one or more expressions that includes its type and value. Arrays are explored recursively with values indented to show structure.
var_export
mixed var_export ( mixed expression [, bool return])
This function returns structured information about the variable that is passed to this function. It is similar to var_dump() with the exception that the returned representation is valid PHP code. Which can be save and used back.
difference between var_dump and var_export:
<?php
$a = array (1, 2, array (”a”, “b”, “c”));
var_export ($a);
/* outputs
array ( 0 => 1, 1 => 2, 2 => array ( 0 => ‘a’, 1 => ‘b’, 2 => ‘c’, ), )
*/
var_dump($a);
/*
array(3) { [0]=> int(1) [1]=> int(2) [2]=> array(3) { [0]=> string(1) “a” [1]=> string(1) “b” [2]=> string(1) “c” } }
*/
?>
