Skip to content

Commit 20dce9f

Browse files
committed
IHF: backtrace_as_string and minimized_backtrace_as_string readme info added.
1 parent 8f5652f commit 20dce9f

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff 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()`

0 commit comments

Comments
 (0)