box world by Rune Kaagaard

<? $s=trim(fgets(STDIN));$l=strlen($s);$r[]=$s.$s[0];for($i=1;$i<$l;$i++){$r[$i]=" ";$r[$i][0]=$s[$l-$i];$r[$i][$l]=$s[$i];}$r[]=$s[0].strrev($s);echo join("\n",$r);

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page