/** * Display info * * @param float $time * @param int $memoryUsage */ protected static function measureInfo(float $time, int $memoryUsage) { $data = [$memoryUsage - static::$lastMemoryUsage, memory_get_peak_usage(), memory_get_peak_usage(true)]; echo Ground::debugText(vsprintf(static::MEASURE_FORMAT, array_merge([number_format(($time - static::$lastTime) * 1000, 4)], array_map('number_format', $data)))); }
/** * Return readable list of variables of instance * * @return string */ public function __toString() : string { $items = method_exists($this, '__debugInfo') ? $this->__debugInfo() : (array) $this; return Ground::debugText(get_class($this) . ' {' . ($items ? "\n" . VariableInspector::itemsInfo($items, '#444') : '') . '}'); }