I'm waiting for Deathshadow to weigh in here, but he'll probably say something like "they added garbage to their garbage". "HTML5 support" is almost enough reason to stay away from something. HTML5 is the new C (if you don't understand that, you're not old enough).
Hii charlesbrown678, Java is best for apps development. Java was originally created to handle client side software and imbedded browser applets. So it has a really wide use in outside of web-development area. PHP on the other hand is only a dedicated web-based technology. So overall, Java is way much used than PHP. Also the second thing to understand when doing PHP vs. JAVA is that if you are thinking of becoming a professional programmer, you can learn just JAVA and you can earn a living, whereas PHP alone is not sufficient. You need to have an understanding of JAVA to become a serious web developer. We also see that JAVA has greater twitter followings than PHP as all PHP programmers are JAVA coders but not all JAVA coders are PHP programmers. To solve your problem to some extent read this blog very carefully http://www.xhtmljunction.com/blog/php-vs-java-performance-benchmark/#more-968
Somendra, you're confusing programming, Java and Javascript, among other things. Not all PHP coders are Jave coders, but most of them are Javascript coders. You don't need to know Java at all to be a professional web developer. Many professional programmers earn a pretty good living with PHP without knowing Java, but not many who don't know programming do.
Ok when it come to apps you really aren't looking at this the best way. PHP is a server side scripting language. Java is not. While it can be done with jsp, Java, IMO as a PHP Developer, is not comparable to PHP. Now I'm not saying PHP is better. Java and PHP are just different. They are used for different things. One of these things is app development. Java is really the only choice here. PHP is not really used for app development. Java is the main choice language for Android app development.
Java is more powerful, more advanced, more flexible ( I'm not talking about syntax or types ), more scaleable and is an industry standard. PHP is easy. This far in, I'm not about to read 10 pages of comments, but I read your initial comments; you want to build a web application. My suggestion is PHP, not because it's better, but because it's likely better for you. Make no mistake, there is nothing PHP can do that Java cannot, with ease - if you are a java programmer. Your comment about being an expert in java is a hard thing to achieve is not exactly true, take any two PHP scripts from anywhere and they will be as different as chalk and cheese. Take any two commonly used java libraries and they will be strikingly similar. Once you get to know the language, and it's functionality, you can apply that knowledge in anything you are tasked with, even if you have to reference external libraries that you have never used before. Lastly, I have no fun writing Java, and plenty with PHP, my personal favorite of the two is PHP ... humans don't always like what is best for them