This snippet of code is syntactically valid in both PHP and Java, and produces the same output in both Source: gist.github.com

I don't know why more programs aren't regularly written like this. It would save from having to fight over which language to use. ;)

Site Comments (1)

Please Signin or Signup to add a comment


0

September 4, 2017, 12:06 pm

palsch wrote:

This is called a polyglot.