Skip to main content
Commonmark migration
Source Link

#PHP, 123+3 bytes

PHP, 123+3 bytes

+3 bytes for the weird tab counting. (it still moves the cursor 8 spaces in any console!)

for($i=10;--$i;)$r.=str_pad(str_pad(" ",$i)."/",20-$i,"_|")."\\";$r[48]=$r[65]="/";$r[50]=$r[63]="\\";$r[49]=o;echo" ^$r"; 

Note: The first character after echo" is a tab character!

Run with -nr or try it online.

other version, same length:

for(;$i++<9;)$r.=str_pad(str_pad(" ",10-$i)."/",10+$i,"_|")."\\";$r[48]=$r[65]="/";$r[50]=$r[63]="\\";$r[49]=o;echo" ^$r"; 

#PHP, 123+3 bytes

+3 bytes for the weird tab counting. (it still moves the cursor 8 spaces in any console!)

for($i=10;--$i;)$r.=str_pad(str_pad(" ",$i)."/",20-$i,"_|")."\\";$r[48]=$r[65]="/";$r[50]=$r[63]="\\";$r[49]=o;echo" ^$r"; 

Note: The first character after echo" is a tab character!

Run with -nr or try it online.

other version, same length:

for(;$i++<9;)$r.=str_pad(str_pad(" ",10-$i)."/",10+$i,"_|")."\\";$r[48]=$r[65]="/";$r[50]=$r[63]="\\";$r[49]=o;echo" ^$r"; 

PHP, 123+3 bytes

+3 bytes for the weird tab counting. (it still moves the cursor 8 spaces in any console!)

for($i=10;--$i;)$r.=str_pad(str_pad(" ",$i)."/",20-$i,"_|")."\\";$r[48]=$r[65]="/";$r[50]=$r[63]="\\";$r[49]=o;echo" ^$r"; 

Note: The first character after echo" is a tab character!

Run with -nr or try it online.

other version, same length:

for(;$i++<9;)$r.=str_pad(str_pad(" ",10-$i)."/",10+$i,"_|")."\\";$r[48]=$r[65]="/";$r[50]=$r[63]="\\";$r[49]=o;echo" ^$r"; 
Source Link
Titus
  • 14.9k
  • 1
  • 25
  • 41

#PHP, 123+3 bytes

+3 bytes for the weird tab counting. (it still moves the cursor 8 spaces in any console!)

for($i=10;--$i;)$r.=str_pad(str_pad(" ",$i)."/",20-$i,"_|")."\\";$r[48]=$r[65]="/";$r[50]=$r[63]="\\";$r[49]=o;echo" ^$r"; 

Note: The first character after echo" is a tab character!

Run with -nr or try it online.

other version, same length:

for(;$i++<9;)$r.=str_pad(str_pad(" ",10-$i)."/",10+$i,"_|")."\\";$r[48]=$r[65]="/";$r[50]=$r[63]="\\";$r[49]=o;echo" ^$r";