Last active
June 13, 2024 07:36
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*<?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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*<?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 |
NotMrPink
commented
Sep 2, 2016
Why is Phava phaping?
But... will it blend?
Just here to read the comments
Can somebody explain what happens after the printf, a string is printed and after that I haven't got a clue what is going on except that a class is created.
Sure, but does it transpile to Javascript?
Why not Japha?
Am I the only one who thought about the current USA election when seeing both code snippets?
I once had a similar idea of PHP in java and created this
Yoo Bro!
This is disgusting, and you should be ashamed. Both languages are already gross; mashing them together just makes me sick.
+1 bravo!
+1 for Phava!
What the...
I'd like to suggest we call this new language
Phava
.
+1
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