if ($this->stopwatch) {
$this->stopwatch->start('dump');
}
- if ($this->isCollected) {
+ if ($this->isCollected && !$this->dumper) {
$this->isCollected = false;
}
}
}
+ public function reset()
+ {
+ if ($this->stopwatch) {
+ $this->stopwatch->reset();
+ }
+ $this->data = array();
+ $this->dataCount = 0;
+ $this->isCollected = false;
+ $this->clonesCount = 0;
+ $this->clonesIndex = 0;
+ }
+
public function serialize()
{
if ($this->clonesCount !== $this->clonesIndex) {
--$i;
}
- if ('cli' !== PHP_SAPI && stripos($h[$i], 'html')) {
+ if (!\in_array(PHP_SAPI, array('cli', 'phpdbg'), true) && stripos($h[$i], 'html')) {
$this->dumper = new HtmlDumper('php://output', $this->charset);
$this->dumper->setDisplayOptions(array('fileLinkFormat' => $this->fileLinkFormat));
} else {