public function traceFunctionRe($re, $deep = false, $showInternals = false)
    {
        $cb = function (\stdClass $record, $isEntry) use ($re, $deep, $showInternals) {
            static $cnt = 0;

            if (\preg_match($re, $record->function)) {
                $cnt += $isEntry ? 1 : -1;

                return null;
            }

            return ($deep && $cnt && ($showInternals || !$record->isInternal)) ? null : self::SKIP;
        };

        $this->setFilterCallback($cb, self::FILTER_BOTH);
    }