HH\heapgraph_foreach_root_node

Description

function HH\heapgraph_foreach_root_node(
  resource $heapgraph,
  mixed $callback,
): void

Iterates over the root nodes in the heap graph. Calls back on every root node. Out-edges from root nodes are also enumerable separately by calling heapgraph_foreach_root().

Parameters

  • resource $heapgraph - The resource obtained with heapgraph_create
  • mixed $callback - function(array $node): void {} See documentation for heapgraph_node() about the "node" array passed to $callback