DEV Community

loading...

Discussion on: What is your favourite function()?

Collapse
inozex profile image
Tiago Marques

I usually do like:
die(var_dump());

Thread Thread
jjjjcccjjf profile image
endan Author

I stopped doing this simply because I can't do it if I dump multiple variables at once.

var_dump($res);
var_dump($res2);
die();
Thread Thread
lexlohr profile image
Alex Lohr

But you could do die(var_dump($res, $res2));, couldn't you?

Thread Thread
inozex profile image
Thread Thread
jjjjcccjjf profile image
endan Author

Really? Wow, #TIL!

Thread Thread
inozex profile image
Tiago Marques

Yeah, just like console.log(var1, var2) in JS