1
0
mirror of https://github.com/danog/amp.git synced 2024-12-02 17:37:50 +01:00
amp/lib/Internal/functions.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)));
}