public static function trace(array $items, string $sep = PHP_EOL): string
    {
        $lines = [];
        foreach ($items as $number => $item) {
            $lines[] = self::item($item, $number);
        }
        $lines[] = '#'.(count($items)).' {main}';
        return implode($sep, $lines).$sep;
    }
public static function trace(array $items, string $sep = PHP_EOL): string
    {
        $lines = [];
        foreach ($items as $number => $item) {
            $lines[] = self::item($item, $number);
        }
        $lines[] = '#'.(count($items)).' {main}';
        return implode($sep, $lines).$sep;
    }
public static function trace ( array $ items , string $ sep = PHP_EOL ) : string { $ lines = [ ] ; foreach ( $ items as $ number => $ item ) { $ lines [ ] = self :: item ( $ item , $ number ) ; } $ lines [ ] = '#' . ( count ( $ items ) ) . ' {main}' ; return implode ( $ sep , $ lines ) . $ sep ; }
Represents a trace as a string

@param array $items
a trace items list
@param string $sep
a line separator
@return string
Represents a trace as a string