HH\heapgraph_foreach_root

Description

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

Iterates over the root edges in the heap graph. Calls back on every root edge. The "from" field of each root edge will be root node. root nodes are also enumerable by calling heapgraph_foreach_root_node().

Parameters

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