Polyglot (computing): Difference between revisions

Content deleted Content added
add an example
Capi (talk | contribs)
"function main()" is converted to "main()", not "int main()" (t"function" is #defined as an empty value, not to "int")
Line 35:
*Shell redirection is used to eliminate undesirable outputs.
*Even on commented out lines, the "<tt>&lt;?php</tt>" and "<tt>?&gt;</tt>" PHP indicators still have effect.
*The statement "<tt>function main()</tt>" is valid in both PHP and bash; C #defines are used to convert it into "<tt>int main()</tt>" at compile time.
*Comment indicators can be combined to perform various operations.
*"<tt>if (($x))</tt>" is a valid statement in both bash and PHP.