mirror of
https://github.com/danog/amp.git
synced 2024-12-02 17:37:50 +01:00
15 lines
358 B
PHP
15 lines
358 B
PHP
<?php
|
|
|
|
namespace Amp\Internal;
|
|
|
|
function formatStacktrace(array $trace): string {
|
|
return implode("\n", array_map(function ($e, $i) {
|
|
$line = "#{$i} {$e['file']}:{$e['line']} ";
|
|
|
|
if ($e["type"]) {
|
|
$line .= $e["class"] . $e["type"];
|
|
}
|
|
|
|
return $line . $e["function"] . "()";
|
|
}, $trace, array_keys($trace)));
|
|
} |