Using FirePHP instead of var_dump

When I output a variable with a function fb()

, it only outputs the value of the variable, is there a way for it to display the type of the variable as well, like what does it do var_dump

? Don't show the variable name, it either shows that the world would be more beautiful!

+3


source to share


2 answers


Try the following:



FB::log(gettype($var).":$var");

      

0


source


You can wrap it up easily.



function fb_dump() {
  ob_start();
  foreach(func_get_args() as $arg) {
    var_dump($arg);
  }
  $debug = ob_get_clean();
  fb($debug());
}

$foo = array(1, 5, 4);
$bar = "lorem ipsum";
fb_dump($foo, $bar);

      

0


source







All Articles