Where the hell have you been? What professionals are you speaking to, this information is pure garbage. Statistically speaking a vast majority of sites used by the public are programmed in PHP. The biggest of course being Facebook.
I currently work as an open source developer and in the bucket of open source you have (Java, Ruby, Python, PHP, ASP.NET(vaguely open source) and ColdFusion "Kind of dead") 89% of my job I deal with PHP. Why? Considering almost
every site uses a CMS now days, it's very hard to find one that is widely used accepted and developed for that's not in PHP. PHP has advanced into a very OOP language, which it may not have been created to do that it most certainly is now. It has become the corner stone of the web market today dominating over many other open source languages. For the web I would recommend learning PHP, Ruby and Python. Java is a great language with a huge potential but many companies that use Java aren't solely using Java. If anything learn one and move to a more advance language, with a very in depth logic behind it such as Object-C or C++. Now if you are deciding to move to native application development.
Then Java will be a must depending on if you're programming for Android which seems to be the only mobile platform utilizing Java right now. iPhone (Objective-C) Windows Mobile (C++, XNA, ASP.NET/C#). Now speaking from a financial benefit, Java developers are paid extremely well and generally very high. The comment that you need a degree to get a development job in Java is asinine. Don't have a degree, never needed one. Most employers will take a person with
more work related experience under their belt then someone with just a degree and a little work experience.
Fact is, learn a language whatever it maybe. Java, PHP, Objective-C, C++, Ruby, Python, ColdFusion whatever. The most important thing about programming is the logic behind it. Learning how to think like a computer and program like that is key, after mastering that just referring to the API will generally solve almost all problems/roadblocks. After awhile the syntax becomes mostly the same with a few variations.