Phava or Jahp? :-)

There is a snippet of code syntactically valid in both PHP and Java, and produces the same output in both. 🙂

How should we call it – Phava or Jahp?

Take a look at it:
/*<?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

Thanks to Davin Ryan (forairan), available at https://gist.github.com/forairan/b1143f42883b3b0ee1237bc9bd0b7b2c 

Komentari su isključeni.

%d blogeri kao ovaj: