mirror of
https://github.com/php/presentations.git
synced 2026-03-24 15:42:33 +01:00
14 lines
299 B
PHP
14 lines
299 B
PHP
<?php
|
|
function generate_backtrace($bt_array)
|
|
{
|
|
// reverse array so we move from start to finish
|
|
rsort($bt_array);
|
|
|
|
$str = '';
|
|
foreach ($bt_array as $entries) {
|
|
$str .= "{$entries['file']}:{$entries['line']} {$entries['function']}(".implode(', ', $entries['args']).")\n";
|
|
}
|
|
|
|
return $str;
|
|
}
|
|
?>
|