box world by TEST

<?\x0d
$s=trim(fgets(STDIN));\x0d
$l=strlen($s);\x0d
$r[]=$s.$s[0];\x0d
for($i=1;$i<$l;$i++) {\x0d
  $r[$i]=" ";\x0d
  $r[$i][0]=$s[$l-$i];\x0d
  $r[$i][$l]=$s[$i];\x0d
}\x0d
$r[]=$s[0].strrev($s);\x0d
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