Skip to content

Instantly share code, notes, and snippets.

View siddharth96's full-sized avatar

Siddharth Srivastava siddharth96

View GitHub Profile
@siddharth96
siddharth96 / PhpJava.java
Created September 1, 2016 17:11 — forked from avafloww/PhpJava.java
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();