Xhgui_Profile::_sumKeys PHP Method

_sumKeys() protected method

Sum up the values in $this->_keys;
protected _sumKeys ( array $a, array $b ) : array
$a array The first set of profile data
$b array The second set of profile data.
return array Merged profile data.
    protected function _sumKeys($a, $b)
    {
        foreach ($this->_keys as $key) {
            if (!isset($a[$key])) {
                $a[$key] = 0;
            }
            $a[$key] += isset($b[$key]) ? $b[$key] : 0;
        }
        return $a;
    }