PHP, @Ionut Botizan@Ionut Botizan
Once upon a time I remember that PHP has a goto
https://regex101.com/r/m5kNRd/1/
double assigments are alternatives for example Newline under Mac and Linux
solution with tab
<?=""; $p="M"&";"; $cr="M"&"-"; $cr="Z"&"*"; $zero=$one=$line=$text=""; $zero++;$zero--; $a=$zero; $s="$zero"&"$"; $one=++$one; $g=$argv{$one}; $dir=$one; a:++$a; $line=$dir?"$line$a":"$a$line"; $line=$a%$g?$dir?"$line$p":"$p$line":"$line$cr"; $dir=$a%$g?$dir:$one-$dir; $text=$a%$g?$text:"$text$line"; $line=$a%$g?$line:""; echo$a-$g*$g?"":$text; $a-$g*$g?:exit; goto a; First I have tought that I must use dynamic spaces
<?=""; $cr="M"&"-"; $cr="Z"&"*"; $zero=$one=$line=$text=""; $zero++;$zero--; $a=$zero; $s="$zero"&"$"; $one=++$one; $five=$one+$one+$one+$one+$one; $ten=$five+$five; ${"v$zero"}="$s$s$s$s$s$s$s"; ${"v$one"}="$s$s$s$s$s$s"; ${"v$ten"}="$s$s$s$s$s"; $g=$argc-$one; $g=$argv{$one}; $space=$zero; $p=${"v$space"}; $dir=$one; a:++$a; $a%$ten?:$space++; $p=${"v$space"}??$p; $line=$dir?"$line$a":"$a$line"; $line=$a%$g?$dir?"$line$p":"$p$line":"$line$cr"; $dir=$a%$g?$dir:$one-$dir; $text=$a%$g?$text:"$text$line"; $line=$a%$g?$line:""; echo$a-$g*$g?"":$text; $a-$g*$g?:exit; goto a;