File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,8 @@ Provides Laravel-specific and pure PHP helper functions.
5151- [Format](#format)
5252 - [get_dump](#get_dump)
5353 - [format_bytes](#format_bytes)
54+ - [backtrace_as_string](#backtrace_as_string)
55+ - [minimized_backtrace_as_string](#minimized_backtrace_as_string)
5456
5557- [Json](#json)
5658 - [is_json](#is_json)
@@ -218,6 +220,32 @@ $formatted = format_bytes(3333333);
218220// 3.18 MB
219221```
220222
223+ #### `backtrace_as_string()`
224+
225+ Returns backtrace without arguments as string:
226+
227+ ```php
228+ $backtrace = backtrace_as_string();
229+
230+ // #0 backtrace_as_string() called at [/full/path/here/example.php:13]
231+ // #1 Example->getBacktrace() called at [/full/path/here/example.php:23]
232+ // #2 Core->run() called at [/full/path/here/src/core.php:33]
233+ // #3 Application->initialize() called at [/full/path/here/src/app.php:45]
234+ ```
235+
236+ #### `minimized_backtrace_as_string()`
237+
238+ Returns minimized backtrace as string:
239+
240+ ```php
241+ $backtrace = minimized_backtrace_as_string();
242+
243+ // #0 /full/path/here/example.php:13
244+ // #1 /full/path/here/example.php:23
245+ // #2 /full/path/here/src/core.php:33
246+ // #3 /full/path/here/src/app.php:45
247+ ```
248+
221249## Json
222250
223251#### `is_json()`
You can’t perform that action at this time.
0 commit comments