0

I'm trying to write a ternary tree in PHP5 but when I want to print my object with var_dump my object is not getting printed totally:

   class TernaryTree#1 (2) {
      public $head =>
      class Node#2 (7) {
        public $payload => NULL
        public $key => string(0) ""
        public $is_leaf => bool(false)
        public $left => class Node#7 (7) {
           public $payload => NULL
           public $key => string(0) ""
           public $is_leaf => bool(false)
           public $left => class Node#6 (7) {
            ...
           }
           public $mid => class Node#8 (7) {
           ...
           }
           public $right => NULL
           public $wordEnd => bool(false)
          }
          public $mid => string(1) "0"
          public $right => NULL
          public $wordEnd => bool(false)
       }
      public $payload => NULL

In xdebug my object isn't looking like this? What are these points "..." in my var_dump()?

1 Answer 1

3

From one of the comments at the var_dump-section of the php-manual:

Keep in mind if you have xdebug installed it will limit the var_dump() output of array elements and object properties to 3 levels deep.

To change the default, edit your xdebug.ini file and add the folllowing line: xdebug.var_display_max_depth=n

More information here: http://www.xdebug.org/docs/display

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.