private function stackTrace($stack)
    {
        $counter = count($stack);
        $lines = array();
        foreach ($stack as $frame) {
            $ret = 'Frame #' . $counter . ' - ';
            $line = isset($frame['line']) ? $frame['line'] : 0;
            $file = isset($frame['file']) ? $frame['file'] : 'Unknown file';
            $args = isset($frame['args']) ? $frame['args'] : array();
            $ret .= 'File ' . $file . ', Line ' . $line 
                . ', function ' . $this->frameToFunction($frame);
            $lines[] = $ret;
            $counter--;
        }

        return $lines;
    }
private function stackTrace($stack)
    {
        $counter = count($stack);
        $lines = array();
        foreach ($stack as $frame) {
            $ret = 'Frame #' . $counter . ' - ';
            $line = isset($frame['line']) ? $frame['line'] : 0;
            $file = isset($frame['file']) ? $frame['file'] : 'Unknown file';
            $args = isset($frame['args']) ? $frame['args'] : array();
            $ret .= 'File ' . $file . ', Line ' . $line 
                . ', function ' . $this->frameToFunction($frame);
            $lines[] = $ret;
            $counter--;
        }

        return $lines;
    }
private function stackTrace ( $ stack ) { $ counter = count ( $ stack ) ; $ lines = array ( ) ; foreach ( $ stack as $ frame ) { $ ret = 'Frame #' . $ counter . ' - ' ; $ line = isset ( $ frame [ 'line' ] ) ? $ frame [ 'line' ] : 0 ; $ file = isset ( $ frame [ 'file' ] ) ? $ frame [ 'file' ] : 'Unknown file' ; $ args = isset ( $ frame [ 'args' ] ) ? $ frame [ 'args' ] : array ( ) ; $ ret .= 'File ' . $ file . ', Line ' . $ line . ', function ' . $ this -> frameToFunction ( $ frame ) ; $ lines [ ] = $ ret ; $ counter -- ; } return $ lines ; }
Convert a stack trace array into readable text
@param $stack [array] stack trace
@return [array] of log lines
Convert a stack trace array into readable text