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
  • 2
    \$\begingroup\$ In the color string and the test, change Grey to X, since it's not used. You'll gain 6 bytes. \$\endgroup\$ Commented Mar 19, 2018 at 11:09
  • \$\begingroup\$ @OlivierGrégoire Oh true. Thanks for that :) \$\endgroup\$ Commented Mar 19, 2018 at 11:10
  • 1
    \$\begingroup\$ Reverse the for's condition to need no parenthesis: x!=$b=$a[array_rand($a)]. BTW, ?> terminates a statement, no need for ; in front of it. \$\endgroup\$ Commented Mar 19, 2018 at 11:30
  • \$\begingroup\$ @manatwork Ohh, nice! I'll update my answer now! \$\endgroup\$ Commented Mar 19, 2018 at 11:33
  • 2
    \$\begingroup\$ You can save a few more bytes by not including x at all and using $b=$a.. as the condition and using rand(0,7) instead of array_rand. You can remove the newline between ?> and Grey duck too. Also your TIO link still had full tags, you can add -d short_open_tag=on to flags to get that working! :) \$\endgroup\$ Commented Mar 19, 2018 at 12:07