Its silly to say that any language is more “enterprise ready” when you are comparing java, php and even asp.
What is “enterprise ready”? I could do roughly similar things in java, php and asp. You can say that jsp is more scalable, or that php has a lower learning curve, sure. But, from what I have seen, “enterprise ready” is really code for “whatever my company bought”. That is all it comes down to. There is no built-in PHP limitation that says “oh! You have too many lines of code on this server! I’m going to stop working because I’m not made for this!” and there is no JSP limitation that says “Screw you, I don’t want to only work with one programmer! Give me a team!”
If you consider the pure merits of a language, you will realize that there is fundamentally no difference. Just because there are PHP programmers who aren’t very good and then run off and write really bad code that isn’t extensible doesn’t neccessarily mean that PHP is a bad language. And the same could be said of JSP!
(This is mostly directed at MJohansson)
However, it’s not possible to say that one is “better”. It basically depends a lot on the size and complexity of your application.
JSP and Java are meant for larger applications. While Java is an agile language, it’s not as agile as PHP for small applications. With PHP, wou can code small things very fast without an IDE (Integrated Develpment Environment - a software used to develop software). Coding Java without an IDE is, in comparison, a pain.
PHP is unbeatable for small scale applications, because it’s so incredibly cheap, in both time and money, to get started with. Add to that that the learning curve is very small, and you instantly have the #1 language for one-man websites.
However, once you start going more advanced and bigger, PHPs agility instead becomes it’s own worst enemy, and you have to do a lot of extra coding to get the infrastructure needed that JSP and .NET already has in place from the beginning. PHP is also very problematic in the sense that it completely lacks a standard approach to development, which causes loss of time when you are dealing with many developers.
I could write an utterly horrible platform in JSP, and .NET. To say that PHP is problematic because it lacks a “standard” approach to development is a bit strange. I could pretty much write a massive JSP page that completely ignored OO. By the same token, I can write PHP code very quickly and get a solution out, yes. But by the same token, I can also get simple java serverlets out at a similarly rapid rate.
Code is code. An if statement in Java is practically the same amount of typing as PHP or .Net. The same if statement does the exact same thing, and has the exact same issues of scale (“Oh no! I used more than 100 lines of code! I must use .NET or JSP now!”). Scalable is nothing more than a buzzword for most situations.
PS: Sorry about that. I will go off on long rants everytime I see people say “my language is better!” Languages are roughly all the same, I have never said to myself “this application is too small/big for the language I’m using. I should rewrite it”. At the level we are looking at (web development), the only difference is what you are most familiar with, or what you have access to, not any intrinsic difference in a language. That is the main issue, not whether Language A can handle sites of 200 pages or more, or whether Language B only works if the site has less than 30 pages.