Skip to content
This repository was archived by the owner on Jan 23, 2019. It is now read-only.

Commit 3548e12

Browse files
committed
update ...
1 parent 8d4b3c7 commit 3548e12

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/Helpers/PhpHelper.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ public static function runtime($startTime, $startMem, array $info = [])
6060
$info['memory'] = number_format(($endMem - $startMem) / 1024, 2) . 'kb';
6161
}
6262

63+
$peakMem = memory_get_peak_usage(true) / 1024 / 1024;
64+
$info['peakMemory'] = number_format($peakMem, 2) . 'Mb';
65+
6366
return $info;
6467
}
6568

@@ -94,6 +97,11 @@ public static function exceptionToString($e, $getTrace = true, $catcher = null):
9497
return PhpException::toString($e, $getTrace, $catcher);
9598
}
9699

100+
public static function exceptionToHtml($e, $getTrace = true, $catcher = null): string
101+
{
102+
return PhpException::toHtml($e, $getTrace, $catcher);
103+
}
104+
97105
/**
98106
* @param \Exception|\Throwable $e
99107
* @param bool $getTrace

0 commit comments

Comments
 (0)