This website uses Cookies to provide you with the best possible service. Please see our Privacy Policy for more information. Click the check box below to accept cookies. Then confirm with a click on "Save".  
Status: 2023-12-27

Debug


info

dumps Data. The source file, line and class/method infos from where the info command was called are shown.

available shorthand function

info(mixed $mData = '', array $aDebugBacktrace = array()) : void

Example

info($this);

Frontend
Debug::info()

CLI
Debug::info()


display

on Frontend, multiple display usages are stacked on top of each other. Each display debug has a count number for better identifying.

The source file, line and class/method infos from where the display command was called are shown.

available shorthand function

display(mixed $mData = '', array $aDebugBacktrace = array()) : void

Frontend
Debug::display()

CLI
Debug::display()


stop

available shorthand function

stop();

Non-shorthand, offering options

Debug::stop(mixed $mData = '', bool $bShowWhereStop = true, bool $bDump = true, array $aBacktrace = array()) : void

Example

stop();
stop at:
- File: /var/www/htdocs/Emvicy/modules/Foo/Controller/Index.php
- Line: 100
- Method: Foo\Controller\Index::index

Example

Debug::stop('here i stopped');

Frontend
Debug::display()

CLI
Debug::display()


varExport

Debug::varExport(mixed $mData, bool $bReturn = false, bool $bShortArraySyntax = true)

Examples

equals var_export(), except that arrays are noted with square brackets [ ]

Debug::varExport($GLOBALS['aConfig'];

equals var_export()

Debug::varExport($GLOBALS['aConfig'], bShortArraySyntax: false);

returns output

$aExport = Debug::varExport($GLOBALS['aConfig'], true);

prepareBacktraceArray

returns an array containing information about the source of the call which leads to this place.

Debug::prepareBacktraceArray(array $aBacktrace = array()) : array

Example

$aDebug = Debug::prepareBacktraceArray(
    debug_backtrace()
);

Result of $aDebug

// type: array, items: 4
[
    'sFile' => '/var/www/htdocs/Emvicy/application/library/MVC/Reflex.php',
    'sLine' => 153,
    'sClass' => 'MVC\\Reflex',
    'sFunction' => 'reflect',
]