src/Dev/Backtrace.php
public static function backtrace($returnVal = false, $ignoreAjax = false, $ignoredFunctions = null)
    {
        $plainText = Director::is_cli() || (Director::is_ajax() && !$ignoreAjax);
        $result = self::get_rendered_backtrace(debug_backtrace(), $plainText, $ignoredFunctions);
        if ($returnVal) {
            return $result;
        } else {
            echo $result;
            return null;
        }
    }
public static function backtrace($returnVal = false, $ignoreAjax = false, $ignoredFunctions = null)
    {
        $plainText = Director::is_cli() || (Director::is_ajax() && !$ignoreAjax);
        $result = self::get_rendered_backtrace(debug_backtrace(), $plainText, $ignoredFunctions);
        if ($returnVal) {
            return $result;
        } else {
            echo $result;
            return null;
        }
    }
public static function backtrace ( $ returnVal = false , $ ignoreAjax = false , $ ignoredFunctions = null ) { $ plainText = Director :: is_cli ( ) || ( Director :: is_ajax ( ) && ! $ ignoreAjax ) ; $ result = self :: get_rendered_backtrace ( debug_backtrace ( ) , $ plainText , $ ignoredFunctions ) ; if ( $ returnVal ) { return $ result ; } else { echo $ result ; return null ; } }
Render or return a backtrace from the given scope.

@param mixed $returnVal
@param bool $ignoreAjax
@param array $ignoredFunctions
@return mixed
Render or return a backtrace from the given scope .