3

When I output a variable using fb() function it only output the variable value, is there any way so it show also variable type like what var_dump does? Nor show name of variable, it any one shows that world would be more beauty!

Handsome Nerd
  • 17,114
  • 22
  • 95
  • 173

2 Answers2

0

Try this:

FB::log(gettype($var).":$var");
RightHandedMonkey
  • 1,718
  • 20
  • 25
0

You can wrap it easily enough.

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);
Sam Dufel
  • 17,560
  • 3
  • 48
  • 51