AnrDaemon
Продвинутый новичок
PHP:
/**
* @deprecated Ambiguously abominable atrocity.
* @see \tool::setFilterTarget()
* @see \tool::startFilter()
* @see \tool::stopFilter()
* @see \tool::breakpoint()
*/ // FIX: Deprecated.
static function debugFilter($mode, $param = NULL)
{
switch(strtoupper($mode))
{
case 'SET':
if(self::$_filterEnabled)
throw new ErrorException('Unable to configure running filter.');
if(empty($param))
self::$_filterTarget = NULL;
else
self::$_filterTarget = $param;
break;
case 'START':
if(self::$_filterEnabled)
break;
ob_start(array('tool', 'ob_debugfilter'), version_compare(PHP_VERSION, '5.4.0', '<') ? 2 : 1);
self::$_filterEnabled = true;
print 'Debug output started.';
break;
case 'STOP':
if(self::$_filterEnabled)
{
print 'Debug output stopped.';
ob_end_flush();
self::$_filterEnabled = false;
}
break;
default:
if(self::$_filterEnabled)
print new toolBreakpoint($mode);
}
}
Как эта функция выглядела ДО self::$_filterEnabled - показывать не буду. Самому стыдно.