/*<?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 |
This comment has been minimized.
This comment has been minimized.
You were so preoccupied with whether or not you could, you didn't stop to think if you should |
This comment has been minimized.
This comment has been minimized.
;) |
This comment has been minimized.
This comment has been minimized.
Excellent work. |
This comment has been minimized.
This comment has been minimized.
Love it |
This comment has been minimized.
This comment has been minimized.
But now we'll never know if Schrodinger's computer is running php or java... |
This comment has been minimized.
This comment has been minimized.
I hope you die in a fire of a 1000 java compilers. |
This comment has been minimized.
This comment has been minimized.
I feel like this will be used for evil in the near future. You flew too close to the sun, Icarus... |
This comment has been minimized.
This comment has been minimized.
Valid but it will throw a warning on calling a non static function, static |
This comment has been minimized.
This comment has been minimized.
Really feel like you missed an opportunity to name this file PhpJava.java.php |
This comment has been minimized.
This comment has been minimized.
I'd like to suggest we call this new language |
This comment has been minimized.
This comment has been minimized.
+1 for |
This comment has been minimized.
This comment has been minimized.
Creative for sure. |
This comment has been minimized.
This comment has been minimized.
This is fantastic. |
This comment has been minimized.
This comment has been minimized.
There is no |
This comment has been minimized.
This comment has been minimized.
+1 for Phava. I further suggest that reusable libraries of code in this new ecosystem be referred to as "Phava Beans". |
This comment has been minimized.
This comment has been minimized.
@Immortalizd : That would be on purpose. It's standard best practice at the moment to leave the ?> off the bottom of any PHP file. (It's not needed, and by leaving it off you can't accidentally end up with a random space or CR after it, causing output that was unintended. |
This comment has been minimized.
This comment has been minimized.
Gah! |
This comment has been minimized.
This comment has been minimized.
Genius. Now we're heading towards files which will compile and interpret in all languages, to rule 'em all. No language wars anymore. |
This comment has been minimized.
This comment has been minimized.
+1 for Phava because PhavaEE you'd have phava beans for your hannibal code that reflectively consumes other classes of the same type. |
This comment has been minimized.
This comment has been minimized.
Another triumph of Banach's Fixed Point Theorem. |
This comment has been minimized.
This comment has been minimized.
really nice! |
This comment has been minimized.
This comment has been minimized.
+1 for |
This comment has been minimized.
This comment has been minimized.
Excellent |
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
+1 for Pharva |
This comment has been minimized.
This comment has been minimized.
"I am become Death, the destroyer of worlds" - @forairan (probably). |
This comment has been minimized.
This comment has been minimized.
There's no |
This comment has been minimized.
This comment has been minimized.
If you implement multi-object classes, will they be PhavaBeans? :-D |
This comment has been minimized.
This comment has been minimized.
Why not |
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
You've crossed the line, dear brother. Now what will happen to all of us? |
This comment has been minimized.
This comment has been minimized.
I cannot wait to beat PHP slingers with this one. |
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
Legendary |
This comment has been minimized.
This comment has been minimized.
wow |
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
It's helpful never to use |
This comment has been minimized.
This comment has been minimized.
creative ! |
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
+1 for Phava ... especially if you consider that in the Tuscan dialect it has a special meaning ;D |
This comment has been minimized.
This comment has been minimized.
Confused computer is confused. |
This comment has been minimized.
This comment has been minimized.
aha |
This comment has been minimized.
This comment has been minimized.
H̡͕͕̲̩̞̫̗̅̃̓ͩ͜ͅẹ̺̣͎̯͔̗̜̈́ͪ ͍̻̫͉̤̥̌ͣ͒̀͟w̨̫̹͋ͭ̈ͦͮ͆̏̀͠h̵̖̮̱̤̣͈̉ͣ̑͆̋̏ô͕͑̀͂ͣ͢ ̿ͩ͜҉̣͕͙̪͚̲̻W̤̝͍̐ͬ̌̚̚͡a̢̰̗̋̿́̃ͪ̃͐ͯͨ͘i̧̧̠̩̤̝͐̊̆̂ͥ̓ͫ̿ͫt̲̫̞̞̊̉̐͒̇̈́̚͠s̶̴͔̖̦̟̟͍͓̫̐̃ͤͣ ̵̲͙̤̪̈ͮ̿ͪͪͧ̆ͅB̼͚̦͖̞̆ͦ̆͑̀͟e̪̦̣̱̯͖̟͋̔͗͗ͥ̿h̹̫̖̀ͤ̈͐̎̈́͋ï̧̛̘̜̥̩͈̥̒̅n̲̹̟̤̺̳͂͒͆ͥ̀͑͋̔͢͜ď̶̺͉͉̟̟̬̪̃ͤ́͆̒̊͝ ̶̛͕̭̇ͫͣ́́̚T̰͈͓͕͉̦̫́̂̓̔́͘͢͟ȟ̶̰̙ͨe̠ͧ̅̍̈́ͩ ̧̛͈̙ͣ̑͛̍͋̔́̚W̨͕̞̲͊̈ͦa͓̣̻͉͍̠̲̫͓ͣͣ͊͗̾l̃͆҉̺̣̩͕͖͔̜̻̬͢l͐̊ͬ̑͆̊̈̅͡͏̪̘͍.̧̼̰̝̳̫̫́ͧͧ́̓̐ͭͯ̆́ |
This comment has been minimized.
This comment has been minimized.
Please, please, please build a full web application server like this. So you know, no single point of failure :). Enterprise customers would be thrilled. |
This comment has been minimized.
This comment has been minimized.
lol |
This comment has been minimized.
This comment has been minimized.
+1 |
This comment has been minimized.
This comment has been minimized.
Those seeking to name the language are getting ahead of themselves; this is just printing a string. Some more work would be needed to demonstrate this can perform arbitrary computation before calling it a language. [... then someone could produce a (say) javascript interpreter with it...] |
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Actually, Phava can be a bit rude and sexually explicit for the people of Tuscany (Italy). |
This comment has been minimized.
This comment has been minimized.
Nice one, there are however some strict notices to be taken care of: https://3v4l.org/0SDi4 |
This comment has been minimized.
This comment has been minimized.
@gmaxwell, you don't get it |
This comment has been minimized.
This comment has been minimized.
I hava created JavaCSharp in the same way~~ |
This comment has been minimized.
This comment has been minimized.
Can you do it for 3 languages ? |
This comment has been minimized.
This comment has been minimized.
Being from Tuscany (Italy), +1 for Phava |
This comment has been minimized.
This comment has been minimized.
Like that Phava |
This comment has been minimized.
This comment has been minimized.
+1 |
This comment has been minimized.
This comment has been minimized.
Phjava..good one |
This comment has been minimized.
This comment has been minimized.
syntactically valid but horrible looking. |
This comment has been minimized.
This comment has been minimized.
That's an abomination... I'm pretty sure the Ghostbusters warned us of this |
This comment has been minimized.
This comment has been minimized.
So who's going to do a to-do app in this format? :D |
This comment has been minimized.
This comment has been minimized.
I always knew that PHP is faster than Java. |
This comment has been minimized.
This comment has been minimized.
+1 for Phava |
This comment has been minimized.
This comment has been minimized.
This is fantastic |
This comment has been minimized.
This comment has been minimized.
Compiling Java code throwing me errors :( |
This comment has been minimized.
This comment has been minimized.
Holy crap, this makes me weep. So ugly |
This comment has been minimized.
This comment has been minimized.
Urgh. Why this shit even exists? Oh boy, some hacker could erase all the compilers and source of Java and PHP... :(. Our World will be a better a please after this. |
This comment has been minimized.
This comment has been minimized.
I for one welcome our new Phava bean overlords! |
This comment has been minimized.
This comment has been minimized.
Some people just want to watch "Hello, world" burn. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Cool |
This comment has been minimized.
This comment has been minimized.
https://github.com/mauke/poly.poly |
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
+1 |
This comment has been minimized.
This comment has been minimized.
Hands down best comment ever. |
This comment has been minimized.
This comment has been minimized.
Same code, same output? Not REALLY. The execution paths are very different, so the compiler/parser isn't seeing the same code... and the output for the PHP example will actually be:
|
This comment has been minimized.
This comment has been minimized.
But does it run in HHVM? |
This comment has been minimized.
This comment has been minimized.
@simonhamp - Yes, different execution paths, but that's the nature of this. It's a joke. The point is that one source file is syntactically valid in two different languages, while producing the same output. Of course they won't have the same execution path. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
What is the purpose of all the |
This comment has been minimized.
This comment has been minimized.
@forairan PHP 7 result is
To avoid this |
This comment has been minimized.
This comment has been minimized.
Now we can all just get along! Kumbaya~~ |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
Oh please no |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@EvgenyOrekhov Fixed, thanks. I was too focused on making it work with both to focus on making it work with one ;) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
PHP is the king of JAVA. |
This comment has been minimized.
This comment has been minimized.
not bad, next step is to beat the polyglot quine at http://shinh.skr.jp/obf/ |
This comment has been minimized.
This comment has been minimized.
Nice! |
This comment has been minimized.
This comment has been minimized.
Love it! |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Phava +1 |
This comment has been minimized.
This comment has been minimized.
Phava +1 |
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
I showed it to my boss and he now wants PHava in production. He believes in cheap and fast. :P |
This comment has been minimized.
This comment has been minimized.
I'm going to create an IDE for this called "Chianti" |
This comment has been minimized.
This comment has been minimized.
I don't know what is that |
This comment has been minimized.
This comment has been minimized.
@cpmiller but why not PHava Jeans? |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Phava +1 It reminds me a bit of the portuguese expression "vá às favas", which grossly translates to "gtfo" lol |
This comment has been minimized.
This comment has been minimized.
Don't let you're Phava dreams be dreams guys. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
Why is Phava phaping? |
This comment has been minimized.
This comment has been minimized.
But... will it blend? |
This comment has been minimized.
This comment has been minimized.
Just here to read the comments |
This comment has been minimized.
This comment has been minimized.
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. |
This comment has been minimized.
This comment has been minimized.
Sure, but does it transpile to Javascript? |
This comment has been minimized.
This comment has been minimized.
Why not Japha? |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Am I the only one who thought about the current USA election when seeing both code snippets? |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I once had a similar idea of PHP in java and created this |
This comment has been minimized.
This comment has been minimized.
Yoo Bro! |
This comment has been minimized.
This comment has been minimized.
This is disgusting, and you should be ashamed. Both languages are already gross; mashing them together just makes me sick. |
This comment has been minimized.
This comment has been minimized.
+1 bravo! |
This comment has been minimized.
This comment has been minimized.
+1 for Phava! |
This comment has been minimized.
This comment has been minimized.
What the... |
This comment has been minimized.
This comment has been minimized.
+1 |
This comment has been minimized.
This comment has been minimized.
I suggest jhj |
This comment has been minimized.