MMO\core\debug
MMO\core\debug · 16 symbols · generated 5 Oct 2026
backtrace
debug.php:40Call \debug_backtrace
- Namespace
MMO\core\debug
| $opts = MMO\core\debug\DEBUG_BACKTRACE_IGNORE_ARGS | int | \debug_backtrace options |
| $limit = 0 | int | \debug_backtrace limit |
| returns | array |
Call graph
Uses (1)
backtraceCaller
debug.php:50Get trace of the caller
- Namespace
MMO\core\debug
Call graph
Uses (1)
Used by (2)
benchmark
debug.php:320Benchmark a closure
- Namespace
MMO\core\debug
Call graph
Uses (1)
callableName
debug.php:278Get the formatted name of a callable
- Namespace
MMO\core\debug
compareTracesOffset
debug.php:182Find where two traces differ, using their file|line|name to find a difference
- Namespace
MMO\core\debug
| $t1 | Log | array | traces |
| $t2 | Log | array | traces |
| returns | int | false | return the index of the first different trace or false, if there is no difference |
Call graph
Used by (1)
filterTraces
debug.php:128Filter traces
- Namespace
MMO\core\debug
| $traces | array | the stack traces, as returned by debug_backtrace() |
| $filters | array | string | list of mask of forms: - function (test if callback is this function) - class->method (test object class and method) - @class (test if object is an instanceof this class) - =class (test if object's class is this class) - #xxx# (test if callback's file match 'xxx' regex) - /xxx/ (test if callback's name match 'xxx' regex) |
| returns | array |
Call graph
Used by (1)
flags
debug.php:218Convert a string into a debug constant mask
- Namespace
MMO\core\debug
formatBytes
debug.php:300Format bytes to human readable size
- Namespace
MMO\core\debug
| $size | int | the bytes value |
| $precision = 2 | int | the precision of the final format |
| $format = '{mem}{unit}' | null | string | |
| returns | array | string |
Call graph
Uses (1)
Used by (2)
info
debug.php:411Return memory info on current execution
- Namespace
MMO\core\debug
Call graph
Uses (1)
memLimit
debug.php:441- Namespace
MMO\core\debug
| returns | int |
Call graph
Uses (1)
memRamUsage
debug.php:437- Namespace
MMO\core\debug
| returns | int |
Call graph
Uses (2)
Used by (1)
parseBytes
debug.php:307- Namespace
MMO\core\debug
Call graph
Uses (1)
Used by (2)
procInfo
debug.php:421- Namespace
MMO\core\debug
Call graph
Uses (1)
Used by (1)
PSRFlag
debug.php:257Convert framework flags to PSR flags
- Namespace
MMO\core\debug
Call graph
Used by (1)
sbenchmark
debug.php:351Benchmark a closure Returns result in a string ex: $a = new DummyClass(); echo \MMO\core\debug\benchmark('test', function() use ($a) {..}, 10000);
- Namespace
MMO\core\debug
| $title | string | |
| $fn | callable | the closure to invoke |
| $count = 100 | int | number of time to execute the closure |
| $precision = 2 | int | the precision for time and memory values |
| $format = null | null | string | the template of the result, with the values below as {placeholders}; null: the default one; '': return the values as an array instead |
| returns | array | string | in the array, the values are: - title: from the given argument - count: from the given argument - file: the closure filename - line: the closure line in filename - time: the average time of one execution in ms - time_total: the total time of all executions in ms - time_min: the minimum time for one execution in ms - time_max: the maximum time for one execution in ms - mem_bytes: the memory usage in bytes of one execution - mem: mem_bytes in a more suitable unit - mem_unit: mem's unit - peak_bytes: the memory peak useage in bytes - peak: peak_bytes in a more suitable unit - peak_unit: peak's unit |
Call graph
Uses (3)
Used by (1)
standardTraces
debug.php:64Standardize traces returned by an Exception or debug_backtrace
- Namespace
MMO\core\debug