Skip to content

Instantly share code, notes, and snippets.

@avafloww
Last active October 16, 2022 18:50
Show Gist options
  • Save avafloww/b1143f42883b3b0ee1237bc9bd0b7b2c to your computer and use it in GitHub Desktop.
Save avafloww/b1143f42883b3b0ee1237bc9bd0b7b2c to your computer and use it in GitHub Desktop.
This snippet of code is syntactically valid in both PHP and Java, and produces the same output in both.
/*<?php
//*/public class PhpJava { public static void main(String[] args) { System.out.printf("/*%s",
//\u000A\u002F\u002A
class PhpJava {
static function main() {
echo(//\u000A\u002A\u002F
"Hello World!");
}}
//\u000A\u002F\u002A
PhpJava::main();
//\u000A\u002A\u002F
/*<?php
//*/public class PhpJava { public static void main(String[] args) { System.out.printf("/*%s",
//\u000A\u002F\u002A
class PhpJava {
static function main() {
echo(//\u000A\u002A\u002F
"Hello World!");
}}
//\u000A\u002F\u002A
PhpJava::main();
//\u000A\u002A\u002F
@macel94
Copy link

macel94 commented Jan 27, 2020

I'd like to suggest we call this new language Phava.

+1

@ejemba
Copy link

ejemba commented Feb 11, 2020

I suggest jhj
this is the only honest name I can produce for this stuff ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment