Languages like ruby and python lack this. Can you do a website in plain ruby as easily? How many mature ruby web frameworks are there in ruby? There are many in php. Zend Framework, Agavi, Kohana, CodeIgniter, Prado, Yii, Symfony and many others.
Of course some stuff in php suck hard. I would personally love an string-object to replace all the stupid str_*() functions, but php is in the right direction of adding features. (My last issues are fixed by 5.3's late static bindings)
And im surprised how php community quickly adopts changes. PHP 5.3 breaks compatibility but i see more people using it everyday.
I think despite all the negativity, PHP is going to stay for long-term.
Don't know about Ruby, but as for Python - yes, you can. There is Python Server Pages in mod_python, which are similiar to mod_php.
However, mod_python is ugly (in a same way mod_php is), so it's generally frowned upon and considered to be Bad Thing.
I've written websites in plain Ruby, as CGI scripts running on Apache. I actually find this easier that PHP, as Ruby doesn't have nearly as many weird inconsistencies. I think I'm pretty unusual in being one of the few Ruby programmers who didn't immediately begin with learning Rails.
This is true for all frameworks in all languages. Instead of doing the Unix thing and providing well-behaved libraries that do one thing well, people build a pile of opinionated spaghetti. To quote HN user mahmud:
"snippet -> program -> application -> library [STOP HERE]-> framework [GO BACK]->platform [GO FUCK YOURSELF]"
Everytime I tried to use any of these PHP frameworks, I got frustated because they demand you to be stucked inside the "convention over configuration" and you can't do anything more complicated into your code without having to read a lot of docs about how to make something outside the "normal code". You always have to inherit you controller from something else.
This is why I built a framework fomr the ground ( http://github.com/rabc/Simple-Framework ). Just because I wanted to craft my own code.
I too ended up using Smarty and doing the rest myself, but I feel that this particular framework has gone in the right direction.
The best thing about Flourish is that it doesn't pretend to be Java, it acknowledges PHP.
Bottom line: it made my code smaller and a lot readable. I highly recommend checking it out.
Can you give an exemple of something it does by default that is "pointless crap" ?
People always confuse features with bloat. Disk space is cheap, and these frameworks aren't hurting things by having additional features.
Now, complexity I can get behind, but stop relating complexity to weight or bloat. CI is less complex than ZF because it does substantially less. It requires developers to do more to accomplish the same tasks ZF developers can do a lot faster. However, it takes a lot more work to get to that point.
Personally, I'm glad we have these choices. We can choose the right tool for the job. =)
I've done two projects with Play and both development cycles are extremely fast.
Anyway, there are lots of things that offend people about PHP that are basically inexcusable: like the inconsistency in parameter order (needle, haystack or the other way around?) and the inconsistent use of underscores in API method calls.
But all of that is just noise. Use something like PHPStorm, Netbeans, Komodo or whatever and it'll tell you the right order or if the function doesn't exist (I know some people are still in love with their raw text editors; I'm not one of them). And you learn quickly enough the right names and orders.
One thing I love about PHP is the simplicity of it. Edit the file, save, refresh in the browser. I love this short feedback loop. It was a refreshing change from doing Web apps in Java (for example), which added a compile/build/package step in between.
After doing this I investigated the common frameworks (CodeIgniter, Kohana, Zend, etc) and frankly I was horrified.
These things are so hideously overcomplicated. It's like a zealous Java programmer tried to recreate "Super-Struts" in PHP in a devilish plan to destroy all of the advantages of PHP while leaving a lot of the negatives.
The number of times I got bitten in the ass or just wasted time trying to figure out how the "magic" in Zend worked was infuriating.
Take something as simple as a controller. This is stupidly easy to implement yourself that any sort of generic framework is just going to bring you pointless crap you don't care about to the stuff you do by a factor of probably 10:1.
The ORM side was even worse. Java is kinda built for ORMs. It has stateful Web containers. PHP isn't (and doesn't).
The one bright spot I found was templating. It is common to say "why use a templating language with PHP when PHP is a templating language?" and you have an entire valid position. I too have said this.
That being said, I found Smarty to be incredibly useful just from the point of view of caching parts of the page and creating my own plugins/extensions for tasks that were common to me. Smarty had other issues like I wasn't completley fond of it's caching model and the speed, prior to Smarty 3 at least (which I've never used), was also questionable.
But despite all that I liked it a lot.
So can you use PHP without a framework? Sure you can. Not only that, I'd highly suggest it if you know what you're doing.