{"id":17797373,"url":"https://github.com/steevanb/php-backtrace","last_synced_at":"2025-03-17T04:31:17.164Z","repository":{"id":51307532,"uuid":"64676198","full_name":"steevanb/php-backtrace","owner":"steevanb","description":"Show nice equivalent to debug_backtrace(), with caller, code preview etc.","archived":false,"fork":false,"pushed_at":"2021-05-16T17:13:52.000Z","size":258,"stargazers_count":21,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-11T01:08:00.859Z","etag":null,"topics":["php","symfony-console"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/steevanb.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-08-01T14:58:51.000Z","updated_at":"2023-05-15T08:32:22.000Z","dependencies_parsed_at":"2022-09-10T17:31:48.692Z","dependency_job_id":null,"html_url":"https://github.com/steevanb/php-backtrace","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steevanb%2Fphp-backtrace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steevanb%2Fphp-backtrace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steevanb%2Fphp-backtrace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steevanb%2Fphp-backtrace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/steevanb","download_url":"https://codeload.github.com/steevanb/php-backtrace/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221671732,"owners_count":16861299,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["php","symfony-console"],"created_at":"2024-10-27T11:55:32.823Z","updated_at":"2024-10-27T11:55:33.486Z","avatar_url":"https://github.com/steevanb.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![version](https://img.shields.io/badge/version-2.1.0-green.svg)](https://github.com/steevanb/php-backtrace/tree/2.1.0)\n[![php](https://img.shields.io/badge/php-^5.4%20||%20^7.0%20||%20^8.0-blue.svg)](http://php.net)\n![Lines](https://img.shields.io/badge/code%20lines-1575-green.svg)\n![Total Downloads](https://poser.pugx.org/steevanb/php-backtrace/downloads)\n[![Scrutinizer](https://scrutinizer-ci.com/g/steevanb/php-backtrace/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/steevanb/php-backtrace/)\n\nphp-backtrace\n-------------\n\nShow nice equivalent to `debug_backtrace()`, with caller, code preview etc.\n\nCan be used in HTML, or with [symfony/console](https://github.com/symfony/console).\n\n[Changelog](changelog.md)\n\nInstallation\n------------\n\n```bash\ncomposer require --dev steevanb/php-backtrace ^2.1\n```\n\nConfiguration\n-------------\n\n```php\n// configure how file paths will be shown\n// true : remove path prefix, based on DumpBacktrace.php path (assume it is in vendor/ dir)\n// false : do not remove anything in file paths\n// string : remove this prefix\n\\DumpBacktrace::setRemovePathPrefix($remove);\n```\n\nDump as HTML\n------------\n\n```php\n// get backtrace dump as array\n\\DebugBacktraceHtml::getBacktraces();\n// get backtrace dump as HTML\n\\DebugBacktraceHtml::getDump();\n// write getDump() HTML with echo\n\\DebugBacktraceHtml::dump();\n// write getDump() HTML with echo, and exit\n\\DebugBacktraceHtml::eDump();\n```\n![HTML backtrace](resources/backtrace_html.png)\n\nDump in symfony/console application\n-----------------------------------\n\n```php\n// Write dump\n\\DebugBacktraceConsole::dump();\n// Write dump and exit\n\\DebugBacktraceConsole::eDump();\n```\n![Console backtrace](resources/backtrace_console.jpg)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsteevanb%2Fphp-backtrace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsteevanb%2Fphp-backtrace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsteevanb%2Fphp-backtrace/lists"}