3
\$\begingroup\$

This is the robbers' thread, the cops' thread is here


A polyglot is a program, that without modification, can run in multiple languages.


Robbers' Challenge

First, find a vulnerable cop's answer, then try to find languages that the submission works in, if you found any that weren't listed by the cop, then you just cracked their answer. Post an answer linking to the original answer and what languages you found it working on (it must do the same thing on each language). You can then leave a comment on their answer linking back to your answer on this thread.


Winning

Most upvoted answer that actually does crack the cops' code wins

\$\endgroup\$
4
\$\begingroup\$

Foo, PotatoLatte's answer

puts "Hello World!"

Try it online!

Ah, the bane of cops and robbers, Foo.

\$\endgroup\$
2
\$\begingroup\$

Befunge-93, Shieru Asakotu's answer

'<?php '//'; #@ SPELL,WITH,ME, ,H,E,L,L,O, ,W,O,R,L,D,"'Hello, World!'"
$a = "'Hello, World!'";
if ([])
 console.log($a); //This should be an easy one to solve
else {
 for ($i = 1; $i < strlen($a) - 1; $i++)
  echo($a[$i]);
}
// ?>'

Try it online!

Prints 'Hello, World!', quotes included.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.