Let me try to answer each question one at a time
What are the pro/cons for a website using java compared to PHP
Many years ago, Commercial applications would be written in Java or .Net. PHP was for hobbyists and small firms...or so the big corporations thought. Facebook et al have now rubbished that idea by showing that PHP can be used for highly scalable, high performing websites.
Java has great support for frameworks and a very strong community.
Java hosting is very difficult to find and not cheap. If you are deploying to your own server though, this is not an issue.
What website should I go to learn the bases for java for a website
- Here is a good place to start.
- Next start to look on the web for a good web application framework, such as Struts, Wicket, Spring MVC or Play (there are far too many to list here).
- Once you have chosen a framework, follow the examples to get to understanding how to build applications. They will point you in the right direction to continue your learning.
Will it be difficult to me to switch from PHP / Symfony to Java for web ?
It won't be a huge leap. PHP is based on the C language. Java was designed with C in mind, as an easy transition for C programmers. Some things are different (like string concatenation in Java is with a plus(+) and not a dot/period(.), but they are not a million miles apart.