diff --git a/src/Dump.php b/src/Dump.php index 0ff5fea..278779f 100644 --- a/src/Dump.php +++ b/src/Dump.php @@ -15,10 +15,10 @@ class Dump { protected $content = null; public function __construct(...$content) { - $this->trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 3)[2] ?? [ + $this->trace = (debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 3)[2] ?? [ "line" => -1, "file" => "unknown", - ]; + ]) + [ 'time' => round(1000 * (microtime(true) - $_SERVER["REQUEST_TIME_FLOAT"]), 4) ]; $this->content = $content; } @@ -28,6 +28,7 @@ class Dump { 'content' => $this->content, 'file' => $this->trace['file'] ?? '?', 'line' => $this->trace['line'] ?? '?', + 'time' => $this->trace['time'], ]; } @@ -39,7 +40,7 @@ class Dump { return << -