How to show all the contents of a variable using var_dump?

Asked

Viewed 198 times

4

I’m thrashing an object (let’s say), but when I use var_dump, the entire content of this object does not appear.

var_dump($obj[0]->link);

Upshot:

string '...atebypass%3Dyes%26dur%3D236.263%26lmt%3D1575166829736796%26c%3DWEB%22'... (length=751)

Is there anything I can do to visualize the rest of this string?

1 answer

5


Is there anything I can do to visualize the rest of this string?

Yes, there is.

You can configure this in your php.ini adding/changing this line:

xdebug.var_display_max_depth=-1

Or add this to the top of your code PHP:

<?php

ini_set("xdebug.var_display_max_children", -1);
ini_set("xdebug.var_display_max_data", -1);
ini_set("xdebug.var_display_max_depth", -1);

Here is an answer on Stack Overflow in English.

  • Great, the second option worked.

  • If it worked, mark the answer.

  • @Shutupmagda, you’re asking to wait five minutes.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.