Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • 1
    \$\begingroup\$ Is shorter if you not declare those functions: $m='array_map';echo join($m("chr",$m("bindec",$m(function($v){return strtr($v,[1,0]);},$m("strrev",$m("decbin",$m("ord",str_split($s))))))));. \$\endgroup\$ Commented Nov 6, 2015 at 16:24
  • \$\begingroup\$ @manatwork completely forgot about that. Thanks. \$\endgroup\$ Commented Nov 6, 2015 at 16:27
  • \$\begingroup\$ You can't just put the input in a variable. You should create a function or read the input from STDIN. By the way, you don't need to use quotes around string ("chr", "bindec", …) since we don't care about warnings. That should save you 12 bytes. \$\endgroup\$ Commented Nov 7, 2015 at 11:50
  • \$\begingroup\$ @Blackhole thanks for the infos, I'll be aware of that next time. \$\endgroup\$ Commented Nov 7, 2015 at 13:40
  • \$\begingroup\$ You'd better do the modification on this answer, which is otherwise invalid :) . It will cost you almost no bytes, just replace str_split($s) with str_split(fgets(STDIN)) for instance. \$\endgroup\$ Commented Nov 7, 2015 at 17:57