shasoft / dump

调试输出包

v1.0.5 2024-06-10 18:35 UTC

This package is auto-updated.

Last update: 2024-09-10 19:11:21 UTC


README

包含函数 s_dd(与 dd 相似)和 s_dump(与 dump 相似),输出这些函数的调用位置。方便在不需要时删除调用。

此外,还包含用于输出异常信息的函数 s_dump_error

    function s_dump_error(string $title, \Exception|\Error $e) {...}

    //--------------------------------------------------------------------------------
    try {
        throw new \Exception('Тест');
    } catch (\Exception $e) {
        s_dump_error('Исключение ' . get_class($e), $e);
        exit(1);
    } catch (\Error $e) {
        s_dump_error('Ошибка ' . get_class($e), $e);
        exit(2);
    }