Пример #1
0
try {
    a();
} catch (Exception $e) {
    debug('Captured exception 1: "' . $e->getMessage() . '"');
    try {
        b();
    } catch (Exception $e) {
        debug('Captured exception 2: "' . $e->getMessage() . '"');
    }
}
$array = array(null, false, true, 1, 3.1415, 'hello', '');
foreach ($array as $value) {
    debug($value, true, 'VALUE:: ');
    $debugString = debug($value, false, 'VAL:: ');
    unreal4u\debugInfo::debugFirePHP($value);
    print $debugString;
}
$nestedArray = $array;
$nestedArray['more'] = $array;
$nestedArray['more']['more'] = $array;
debug($array);
debug($nestedArray);
$writtenToFile = debugFile($array, '', '/tmp/');
debug($writtenToFile, true, 'Written to file: ');
print $debugInfo;
unreal4u\debugInfo::debugFirePHP($array);
$debugInfo->endCounter('beginScript');
printf('Terminating the script... Total time: ');
debug($debugInfo->getDiff('beginScript', 'all'));
printf('The exact timestamp at which this script ended is %.4f (%s) and we are using %s of memory', getExactTime(), $debugInfo::convertTimestamp(getExactTime()), $debugInfo->getMemoryUsage('kib', true));
ob_end_flush();
Пример #2
0
/**
 * Implements debugInfo::debugFirePHP as a function
 *
 * @see debugInfo::debugFirePHP
 * @param unknown $a
 * @param string $print
 * @param string $message
 * @return Ambigous <string, boolean>
 */
function debugFirePHP($a, $print = false, $message = '')
{
    return unreal4u\debugInfo::debugFirePHP($a, $print, $message);
}