>>27
No, not a PHP programmer. Just saying that shared resources are an obstacle to scalability.
If you have a crappy PHP app, you can always scale it by running it on more boxes (until your DB craps out, but that's harder than it sounds, unless your app is really bad). If you have a Java app, then it has MUCH MUCH better *performance* to begin with, but if your box's CPU maxes out, you can't just buy another one because then you'd need to get the two Java processes to communicate... under the assumption that you do want your shared resources to be consistent.
PHP ain't my favorite language by a long shot, but it's great for wrapping HTML around a database and it does scale far, far better than Java single-process shared-memory multiple-thread apps... though Java does have a mile-long head start by being that much faster to begin with.
Yeah, I've used both for enterprise apps, and suffice it to say I don't use either for anything I write (except crappy HTML wrappers around a DB, which PHP is still pretty awesome for).