How to resolve the dead loop in simple_html_dom execution?

  node.js, question
 $list_html = new simple_html_dom();
 var_dump($list_html->find('a.list-group-item',0));  exit();

After this code is executed, it will dump the data in the page indefinitely. How can it be solved like a dead loop? The a.list-group-item element certainly exists. . .

After using javascript, you should know that dom is actually a tree, namely DOM Tree. Each DOM node will contain its direct parent node and the serial number of the node. It is convenient to locate and traverse the rendered page. Please think about it. If the nesting level is a little deeper, your var_dump will definitely be unable to output because the level is too deep (it usually appears to be overtime when xdebug is not installed). After xdebug is installed, please see:, usually output up to 3 levels of nesting depth, so I suggest not to use var_dump to debug simple_html_dom or its simple_html_dom_node objects, but to install xdebug for breakpoint debugging, and play some high-end ha. how to debug is beyond the scope of this answer, please use Baidu “xdebug breakpoint debugging”.