Why kpr() shows different content than var_dump()? In one vital part of code I started to get "Trying to get a property on a non-object" type of errors. So I wanted to investigate it.

var_dump($download);
die();


Gives:

array(3) {
  [1]=&gt;
  array(5) {
    [5]=&gt;
    object(stdClass)#156 (11) {
      ["idDownload"]=&gt;
      string(1) "5"
      ...
    }
    [6]=&gt;
    object(stdClass)#155 (11) {
      ["idDownload"]=&gt;
      string(1) "6"
      ...
    }
    [7]=&gt;
    object(stdClass)#151 (11) {
      ["idDownload"]=&gt;
      string(1) "7"
      ...
    }
    [8]=&gt;
    object(stdClass)#185 (11) {
      ["idDownload"]=&gt;
      ...
    }
    [10]=&gt;
    object(stdClass)#177 (11) {
      ["idDownload"]=&gt;
      string(2) "10"
      ...
    }
  }
  [2]=&gt;
  array(5) {
    [5]=&gt;
    object(stdClass)#186 (11) {
      ["idDownload"]=&gt;
      string(1) "5"
      ...
    }
    [6]=&gt;
    object(stdClass)#155 (11) {
      ["idDownload"]=&gt;
      string(1) "6"
      ...
    }
    [7]=&gt;
    object(stdClass)#151 (11) {
      ["idDownload"]=&gt;
      string(1) "7"
      ...
    }
    [10]=&gt;
    object(stdClass)#177 (11) {
      ["idDownload"]=&gt;
      string(2) "10"
      ...
    }
  }
  [3]=&gt;
  array(5) {
    [5]=&gt;
    object(stdClass)#184 (11) {
      ["idDownload"]=&gt;
      string(1) "5"
      ...
    }
    [6]=&gt;
    object(stdClass)#155 (11) {
      ["idDownload"]=&gt;
      string(1) "6"
      ...
    }
    [7]=&gt;
    object(stdClass)#151 (11) {
      ["idDownload"]=&gt;
      string(1) "7"
      ...
    }
    [8]=&gt;
    object(stdClass)#185 (11) {
      ["idDownload"]=&gt;
      string(1) "8"
      ...
    }
    [10]=&gt;
    object(stdClass)#177 (11) {
      ["idDownload"]=&gt;
      string(2) "10"
      ...
    }
  }
}


But if I'll switch to kpr() like this:

kpr($download);
//die();


I get this:



Why can it happen? And can how I get kpr() to work? using var_dump() in form debugging is not really an option.
$download[1][6] and $download[2][6] are the exact same object (object(stdClass)#155), not just two objects with equal values. To avoid potential infinite recursion, Krumo (the k in kpr()) only display a single object once. The screenshot shows this, $download[2][6] is displayed as "∞ (Recursion)" because the object is already displayed (but collapsed in the screenshot) above as $download[1][6].

var_dump() does not have this limitation as it does not try to prevent infinite recursion.