public static function trace(array $stack) {
		$result = [];

		foreach ($stack as $frame) {
			if (isset($frame['function'])) {
				if (isset($frame['class'])) {
					$result[] = trim($frame['class'], '\\') . '::' . $frame['function'];
				} else {
					$result[] = $frame['function'];
				}
			}
		}
		return $result;
	}
public static function trace(array $stack) {
		$result = [];

		foreach ($stack as $frame) {
			if (isset($frame['function'])) {
				if (isset($frame['class'])) {
					$result[] = trim($frame['class'], '\\') . '::' . $frame['function'];
				} else {
					$result[] = $frame['function'];
				}
			}
		}
		return $result;
	}
public static function trace ( array $ stack ) { $ result = [ ] ; foreach ( $ stack as $ frame ) { if ( isset ( $ frame [ 'function' ] ) ) { if ( isset ( $ frame [ 'class' ] ) ) { $ result [ ] = trim ( $ frame [ 'class' ] , '\\' ) . '::' . $ frame [ 'function' ] ; } else { $ result [ ] = $ frame [ 'function' ] ; } } } return $ result ; }
Trim down a typical stack trace to class & method calls.

@param array $stack A `debug_backtrace()`-compatible stack trace output.
@return array Returns a flat stack array containing class and method references.
Trim down a typical stack trace to class & method calls .