我正在尝试在PHP5中编写一个三元树,但是当我想用var_dump打印我的对象时,我的对象并没有被完全打印出来:
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
在xdebug中我的对象看起来不像这样?在我的var_dump()中,这些点“......”是什么?
答案 0 :(得分:3)
来自one of the comments的var_dump部分的php-manual:
请记住,如果安装了xdebug,它会将数组元素和对象属性的var_dump()输出限制为3级。
要更改默认值,请编辑xdebug.ini文件并添加以下行: xdebug.var_display_max_depth = N